woocommerce_blocks_cart_enqueue_data action-hookWC 5.8.0

Fires after cart block data is registered.

Usage

add_action( 'woocommerce_blocks_cart_enqueue_data', 'wp_kama_woocommerce_blocks_cart_enqueue_data_action' );

/**
 * Function for `woocommerce_blocks_cart_enqueue_data` action-hook.
 * 
 * @return void
 */
function wp_kama_woocommerce_blocks_cart_enqueue_data_action(){

	// action...
}

Changelog

Since 5.8.0 Introduced.

Where the hook is called

MiniCart::enqueue_data()
woocommerce_blocks_cart_enqueue_data
Cart::enqueue_data()
woocommerce_blocks_cart_enqueue_data
woocommerce/src/Blocks/BlockTypes/MiniCart.php 215
do_action( 'woocommerce_blocks_cart_enqueue_data' );
woocommerce/src/Blocks/BlockTypes/Cart.php 262
do_action( 'woocommerce_blocks_cart_enqueue_data' );

Where the hook is used in WooCommerce

woocommerce/src/Blocks/Domain/Services/CheckoutFields.php 244
add_action( 'woocommerce_blocks_cart_enqueue_data', array( $this, 'add_fields_data' ) );
woocommerce/src/Blocks/Payments/Api.php 49
add_action( 'woocommerce_blocks_cart_enqueue_data', array( $this, 'add_payment_method_script_data' ) );