can_use_premium_code() : false; } } /** True when the Pro module files are present (paid build), whatever the license state. */ public static function has_pro_files() { return file_exists( WEBHOOK_BUTTONS_PLUGIN_DIR . 'includes/pro/Pro.php' ); } /** Where "Upgrade" points, or null when this build must not show upsell links (marketplace rule). */ public static function upgrade_url() { if ( self::channel() === self::MARKETPLACE ) { return null; } $fs = function_exists( 'webhook_buttons_fs' ) ? webhook_buttons_fs() : null; return $fs ? $fs->get_upgrade_url() : 'https://noblestrategies.dev/webhook-buttons'; } /** What the settings page needs to know. */ public static function for_js() { return [ 'channel' => self::channel(), 'pro' => self::is_pro(), 'has_pro' => self::has_pro_files(), 'upgrade_url' => self::upgrade_url(), ]; } }