WC_Helper_Admin::loadpublic staticWC 1.0

Loads the class, runs on init

Метод класса: WC_Helper_Admin{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = WC_Helper_Admin::load();

Код WC_Helper_Admin::load() WC 10.3.4

public static function load() {
	if ( is_admin() ) {
		$is_wc_home_or_in_app_marketplace = (
			isset( $_GET['page'] ) && 'wc-admin' === $_GET['page'] //phpcs:ignore WordPress.Security.NonceVerification.Recommended
		);

		if ( $is_wc_home_or_in_app_marketplace ) {
			add_filter( 'woocommerce_admin_shared_settings', array( __CLASS__, 'add_marketplace_settings' ) );
		}

		add_filter( 'woocommerce_debug_tools', array( __CLASS__, 'register_cache_clear_tool' ) );
	}

	add_filter( 'rest_api_init', array( __CLASS__, 'register_rest_routes' ) );
}