Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::init()protectedWC 1.0

Hook into WP asset registration for enqueueing asset data.

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

Хуков нет.

Возвращает

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

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->init();

Код AssetDataRegistry::init() WC 8.7.0

protected function init() {
	add_action( 'init', array( $this, 'register_data_script' ) );
	add_action( is_admin() ? 'admin_print_footer_scripts' : 'wp_print_footer_scripts', array( $this, 'enqueue_asset_data' ), 1 );
}