Automattic\WooCommerce\Admin\Composer

Package::init()public staticWC 1.0

Init the package.

Only initialize for WP 5.3 or greater.

{} Это метод класса: Package{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$result = Package::init();

Код Package::init() WC 6.6.1

public static function init() {
	// Avoid double initialization when the feature plugin is in use.
	if ( defined( 'WC_ADMIN_VERSION_NUMBER' ) ) {
		self::$active_version = WC_ADMIN_VERSION_NUMBER;
		return;
	}

	$feature_plugin_instance = FeaturePlugin::instance();

	// Indicate to the feature plugin that the core package exists.
	if ( ! defined( 'WC_ADMIN_PACKAGE_EXISTS' ) ) {
		define( 'WC_ADMIN_PACKAGE_EXISTS', true );
	}

	self::$package_active = true;
	self::$active_version = self::VERSION;
	$feature_plugin_instance->init();

	// Unhook the custom Action Scheduler data store class in active older versions of WC Admin.
	remove_filter( 'action_scheduler_store_class', array( $feature_plugin_instance, 'replace_actionscheduler_store_class' ) );
}