. * * @package StoreEngine\LicenseManagementClientSDK */ declare( strict_types=1 ); // IMPORTANT — loading order with multiple bundled copies: // The "newest version wins" election below only counts copies whose init.php // actually runs. Composer's autoload_files de-dupes this file by a // package-stable hash, so when several active plugins each bundle this SDK only // the first plugin's vendor/autoload.php includes it — the rest are skipped and // never register their version. To be immune to load order, require this file // DIRECTLY (require_once '.../vendor/storeengine/wordpress-sdk/init.php') rather // than relying solely on Composer autoload. See README "loading order". if ( ! function_exists( 'se_license_manager_register_1_dot_5_dot_5' ) && function_exists( 'add_action' ) ) { // WRCS: DEFINED_VERSION. if ( ! class_exists( 'SE_License_SDK_Version_Manager', false ) ) { require_once __DIR__ . '/classes/SE_License_SDK_Version_Manager.php'; add_action( 'plugins_loaded', [ 'SE_License_SDK_Version_Manager', 'initialize_latest_version' ], 1, 0 ); } add_action( 'plugins_loaded', 'se_license_manager_register_1_dot_5_dot_5', 0, 0 ); // WRCS: DEFINED_VERSION. // phpcs:disable Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace /** * Registers this version of SE_License_SDK. */ function se_license_manager_register_1_dot_5_dot_5() { // WRCS: DEFINED_VERSION. $versions = SE_License_SDK_Version_Manager::instance(); $versions->register( '1.5.5', 'se_license_manager_initialize_1_dot_5_dot_5' ); // WRCS: DEFINED_VERSION. } // phpcs:disable Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace /** * Initializes this version of Action Scheduler. */ function se_license_manager_initialize_1_dot_5_dot_5() { // WRCS: DEFINED_VERSION. // A final safety check is required even here, because historic versions of Action Scheduler // followed a different pattern. (In some unusual cases, we could reach this point and the // SE_License_SDK class is already defined—so we need to guard against that.) if ( ! class_exists( 'SE_License_SDK', false ) ) { require_once __DIR__ . '/classes/abstracts/SE_License_SDK.php'; SE_License_SDK::init( __FILE__, '1.5.5' ); } } // Support usage in themes - load this version if no plugin has loaded a version yet. if ( did_action( 'plugins_loaded' ) && ! doing_action( 'plugins_loaded' ) && ! class_exists( 'SE_License_SDK', false ) ) { se_license_manager_initialize_1_dot_5_dot_5(); // WRCS: DEFINED_VERSION. do_action( 'action_scheduler_pre_theme_init' ); SE_License_SDK_Version_Manager::initialize_latest_version(); } } // End of file init.php.