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

Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::enqueue_asset_data() public WC 1.0

Callback for enqueuing asset data via the WP api.

Note: while this is hooked into print/admin_print_scripts, it still only happens if the script attached to wc-settings handle is enqueued. This is done to allow for any potentially expensive data generation to only happen for routes that need it.

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

Хуков нет.

Возвращает

Null. Ничего.

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

$AssetDataRegistry = new AssetDataRegistry();
$AssetDataRegistry->enqueue_asset_data();

Код AssetDataRegistry::enqueue_asset_data() WC 4.7.1

<?php
public function enqueue_asset_data() {
	if ( wp_script_is( $this->handle, 'enqueued' ) ) {
		$this->initialize_core_data();
		$this->execute_lazy_data();
		$data = rawurlencode( wp_json_encode( $this->data ) );
		wp_add_inline_script(
			$this->handle,
			"var wcSettings = wcSettings || JSON.parse( decodeURIComponent( '"
				. esc_js( $data )
				. "' ) );",
			'before'
		);
	}
}