Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::register_data_script()publicWC 1.0

Callback for registering the data script via WordPress API.

Method of the class: AssetDataRegistry{}

No Hooks.

Return

null. Nothing (null).

Usage

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

AssetDataRegistry::register_data_script() code WC 8.7.0

public function register_data_script() {
	$this->api->register_script(
		$this->handle,
		'assets/client/blocks/wc-settings.js',
		[ 'wp-api-fetch' ],
		true
	);
}