action_scheduler_failed_execution
Runs when action execution fails.
Usage
add_action( 'action_scheduler_failed_execution', 'wp_kama_action_scheduler_failed_execution_action', 10, 3 ); /** * Function for `action_scheduler_failed_execution` action-hook. * * @param int $action_id Action ID. * @param Exception $e Exception instance. * @param string $context Execution context. * * @return void */ function wp_kama_action_scheduler_failed_execution_action( $action_id, $e, $context ){ // action... }
- $action_id(int)
- Action ID.
- $e(Exception)
- Exception instance.
- $context(string)
- Execution context.
Where the hook is called
action_scheduler_failed_execution
woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php 142
do_action( 'action_scheduler_failed_execution', $action_id, $e, $context );
Where the hook is used in WooCommerce
woocommerce/packages/action-scheduler/classes/ActionScheduler_FatalErrorMonitor.php 49
add_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0, 0 );
woocommerce/packages/action-scheduler/classes/ActionScheduler_FatalErrorMonitor.php 62
remove_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0 );
woocommerce/packages/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php 89
add_action( 'action_scheduler_failed_execution', array( $this, 'action_failed' ), 10, 2 );
woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Logger.php 70
add_action( 'action_scheduler_failed_execution', array( $this, 'log_failed_action' ), 10, 3 );