woocommerce_block_template_after_add_block_error
Action called after an exception is thrown by a woocommerce_block_template_after_add_block hook.
Использование
add_action( 'woocommerce_block_template_after_add_block_error', 'wp_kama_woocommerce_block_template_after_add_error_action', 10, 3 ); /** * Function for `woocommerce_block_template_after_add_block_error` action-hook. * * @param BlockInterface $block The block. * @param string $action The action that threw the exception. * @param \Exception $exception The exception. * * @return void */ function wp_kama_woocommerce_block_template_after_add_error_action( $block, $action, $exception ){ // action... }
- $block(BlockInterface)
- The block.
- $action(строка)
- The action that threw the exception.
- $exception(\Exception)
- The exception.
Список изменений
С версии 8.4.0 | Введена. |
Где вызывается хук
woocommerce_block_template_after_add_block_error
woocommerce/src/Internal/Admin/BlockTemplates/BlockContainerTrait.php 268-273
do_action( 'woocommerce_block_template_after_add_block_error', $block, $action, $e, );