woocommerce_block_template_after_add_block action-hookWC 8.2.0

Action called after a block is added to a block container.

This action can be used to perform actions after a block is added to the block container, such as adding a dependent block.

Usage

add_action( 'woocommerce_block_template_after_add_block', 'wp_kama_woocommerce_block_template_after_add_action' );

/**
 * Function for `woocommerce_block_template_after_add_block` action-hook.
 * 
 * @param BlockInterface $block The block.
 *
 * @return void
 */
function wp_kama_woocommerce_block_template_after_add_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_after_add_block
woocommerce/src/Internal/Admin/BlockTemplates/BlockContainerTrait.php 221
do_action( 'woocommerce_block_template_after_add_block', $block );

Where the hook is used in WooCommerce

Usage not found.