woocommerce_block_template_area_(root_templatearea)_after_remove_block_(blockid)
Action called after a specific block is removed from a template with a specific area.
This action can be used to perform actions after a specific block is removed from a template with a specific area, such as removing a dependent block.
Usage
add_action( 'woocommerce_block_template_area_(root_templatearea)_after_remove_block_(blockid)', 'wp_kama_woocommerce_block_template_area_root_templatearea_after_remove_blockid_action' ); /** * Function for `woocommerce_block_template_area_(root_templatearea)_after_remove_block_(blockid)` action-hook. * * @param BlockInterface $block The block. * * @return void */ function wp_kama_woocommerce_block_template_area_root_templatearea_after_remove_blockid_action( $block ){ // action... }
- $block(BlockInterface)
- The block.
Changelog
Since 8.2.0 | Introduced. |
Where the hook is called
woocommerce_block_template_area_(root_templatearea)_after_remove_block_(blockid)
woocommerce/src/Internal/Admin/BlockTemplates/BlockContainerTrait.php 318
do_action( "woocommerce_block_template_area_{$this->get_root_template()->get_area()}_after_remove_block_{$block->get_id()}", $block );