'; echo esc_html(sprintf( /* translators: %s: the PHP version the site runs, for example 8.0.30. */ __('WConvert needs PHP 8.1 or newer, and this site runs PHP %s. WConvert is paused until PHP is updated. Your host can update it for you.', 'wconvert'), PHP_VERSION )); echo '

'; }); return; } require_once __DIR__ . '/src/constants.php'; // The ZIP carries packages/autoload.php (wp-scoper's, or the PSR-4 template's) and // no vendor/autoload.php; a source checkout has only Composer's. $wconvertAutoloader = __DIR__ . '/packages/autoload.php'; if (!is_file($wconvertAutoloader)) { $wconvertAutoloader = __DIR__ . '/vendor/autoload.php'; } if (!is_file($wconvertAutoloader)) { add_action('admin_notices', static function (): void { echo '

'; echo esc_html__( 'WConvert could not start — its autoloader is missing. Reinstall the plugin to restore it.', 'wconvert' ); echo '

'; }); return; } require_once $wconvertAutoloader; /* |-------------------------------------------------------------------------- | Action Scheduler, bundled — a CORE dependency, not a premium one |-------------------------------------------------------------------------- | Every [[Destination]] push is queued, including the in-process MailPoet and | lead-magnet ones, so the free plugin needs a scheduler with no ESP in sight | (#4, ADR 0008). WSMS's own build stages Action Scheduler into its FREE tier | for the same reason, and WooCommerce has shipped it that way for years. | | Loaded HERE rather than on `plugins_loaded`, because Action Scheduler | version-negotiates at load time so the newest copy on the site wins — and a | copy that registers late has already lost that negotiation. It must never be | php-scoped for the same reason: `wp-sms.php:127` says it outright, "shared | library — must NOT be prefixed". | | Composer's autoloader does not pull it in: it is a WordPress plugin rather | than a PSR-4 library, and its entry file is what defines `as_*()`. */ $wconvertActionScheduler = __DIR__ . '/vendor/woocommerce/action-scheduler/action-scheduler.php'; if (is_file($wconvertActionScheduler)) { require_once $wconvertActionScheduler; } WConvert\Bootstrap::init();