WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Авторские Темы для WordPress
функция не описана

Automattic\WooCommerce\Blocks

AssetsController::register_assets() public WC 1.0

Register block scripts & styles.

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

Хуков нет.

Возвращает

null. Ничего.

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

$AssetsController = new AssetsController();
$AssetsController->register_assets();

Код AssetsController::register_assets() WC 5.4.1

<?php
public function register_assets() {
	$this->register_style( 'wc-block-vendors-style', plugins_url( $this->api->get_block_asset_build_path( 'vendors-style', 'css' ), __DIR__ ) );
	$this->register_style( 'wc-block-editor', plugins_url( $this->api->get_block_asset_build_path( 'editor', 'css' ), __DIR__ ), array( 'wp-edit-blocks' ) );
	$this->register_style( 'wc-block-style', plugins_url( $this->api->get_block_asset_build_path( 'style', 'css' ), __DIR__ ), array( 'wc-block-vendors-style' ) );

	wp_style_add_data( 'wc-block-editor', 'rtl', 'replace' );
	wp_style_add_data( 'wc-block-style', 'rtl', 'replace' );

	$this->api->register_script( 'wc-blocks-middleware', 'build/wc-blocks-middleware.js', [], false );
	$this->api->register_script( 'wc-blocks-data-store', 'build/wc-blocks-data.js', [ 'wc-blocks-middleware' ] );
	$this->api->register_script( 'wc-blocks', $this->api->get_block_asset_build_path( 'blocks' ), [], false );
	$this->api->register_script( 'wc-vendors', $this->api->get_block_asset_build_path( 'vendors' ), [], false );
	$this->api->register_script( 'wc-blocks-registry', 'build/wc-blocks-registry.js', [], false );
	$this->api->register_script( 'wc-shared-context', 'build/wc-shared-context.js', [] );
	$this->api->register_script( 'wc-shared-hocs', 'build/wc-shared-hocs.js', [], false );
	$this->api->register_script( 'wc-price-format', 'build/price-format.js', [], false );

	if ( Package::feature()->is_feature_plugin_build() ) {
		$this->api->register_script( 'wc-blocks-checkout', 'build/blocks-checkout.js', [] );
	}

	wp_add_inline_script(
		'wc-blocks-middleware',
		"
		var wcBlocksMiddlewareConfig = {
			storeApiNonce: '" . esc_js( wp_create_nonce( 'wc_store_api' ) ) . "',
			wcStoreApiNonceTimestamp: '" . esc_js( time() ) . "'
		};
		",
		'before'
	);
}