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

Automattic\WooCommerce\Blocks\BlockTypes

Cart::enqueue_data() protected WC 1.0

Extra data passed through from server to client for block.

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

Хуки из метода
Возвращает

null. Null. Ничего.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->enqueue_data( $attributes );
$attributes(массив)
Any attributes that currently are available from the block. Note, this will be empty in the editor context when the block is not in the post content on editor load.

Код Cart::enqueue_data() WC 5.2.0

<?php
protected function enqueue_data( array $attributes = [] ) {
	parent::enqueue_data( $attributes );

	if ( ! $this->asset_data_registry->exists( 'shippingCountries' ) ) {
		$this->asset_data_registry->add( 'shippingCountries', $this->deep_sort_with_accents( WC()->countries->get_shipping_countries() ) );
	}

	if ( ! $this->asset_data_registry->exists( 'shippingStates' ) ) {
		$this->asset_data_registry->add( 'shippingStates', $this->deep_sort_with_accents( WC()->countries->get_shipping_country_states() ) );
	}

	if ( ! $this->asset_data_registry->exists( 'countryLocale' ) ) {
		// Merge country and state data to work around https://github.com/woocommerce/woocommerce/issues/28944.
		$country_locale = wc()->countries->get_country_locale();
		$states         = wc()->countries->get_states();

		foreach ( $states as $country => $states ) {
			if ( empty( $states ) ) {
				$country_locale[ $country ]['state']['required'] = false;
				$country_locale[ $country ]['state']['hidden']   = true;
			}
		}
		$this->asset_data_registry->add( 'countryLocale', $country_locale );
	}

	$permalink = ! empty( $attributes['checkoutPageId'] ) ? get_permalink( $attributes['checkoutPageId'] ) : false;

	if ( $permalink && ! $this->asset_data_registry->exists( 'page-' . $attributes['checkoutPageId'] ) ) {
		$this->asset_data_registry->add( 'page-' . $attributes['checkoutPageId'], $permalink );
	}

	// Hydrate the following data depending on admin or frontend context.
	if ( ! is_admin() && ! WC()->is_rest_api_request() ) {
		$this->hydrate_from_api();
	}

	do_action( 'woocommerce_blocks_cart_enqueue_data' );
}