woocommerce_block_template_after_add_block
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
woocommerce_block_template_after_add_block
woocommerce/src/Internal/Admin/BlockTemplates/BlockContainerTrait.php 221
do_action( 'woocommerce_block_template_after_add_block', $block );