woocommerce_block_template_area_(root_templatearea)_after_add_block_(blockid) action-hookWC 8.2.0

Action called after a specific block is added to a template with a specific area.

This action can be used to perform actions after a specific block is added to a template with a specific area, such as adding a dependent block.

Usage

add_action( 'woocommerce_block_template_area_(root_templatearea)_after_add_block_(blockid)', 'wp_kama_woocommerce_block_template_area_root_templatearea_after_add_blockid_action' );

/**
 * Function for `woocommerce_block_template_area_(root_templatearea)_after_add_block_(blockid)` action-hook.
 * 
 * @param BlockInterface $block The block.
 *
 * @return void
 */
function wp_kama_woocommerce_block_template_area_root_templatearea_after_add_blockid_action( $block ){

	// action...
}
$block(BlockInterface)
The block.

Changelog

Since 8.2.0 Introduced.

Where the hook is called

In file: /src/Internal/Admin/BlockTemplates/BlockContainerTrait.php
woocommerce_block_template_area_(root_templatearea)_after_add_block_(blockid)
woocommerce/src/Internal/Admin/BlockTemplates/BlockContainerTrait.php 245
do_action( "woocommerce_block_template_area_{$this->get_root_template()->get_area()}_after_add_block_{$block->get_id()}", $block );

Where the hook is used in WooCommerce

Usage not found.