ActionScheduler_Abstract_QueueRunner::handle_action_error()
Marks actions as either having failed execution or failed validation, as appropriate.
Метод класса: ActionScheduler_Abstract_QueueRunner{}
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->handle_action_error( $action_id, $e, $context, $valid_action );
- $action_id(int) (обязательный)
- Action ID.
- $e(Exception) (обязательный)
- Exception instance.
- $context(строка) (обязательный)
- Execution context.
- $valid_action(true|false) (обязательный)
- If the action is valid.
Код ActionScheduler_Abstract_QueueRunner::handle_action_error() ActionScheduler Abstract QueueRunner::handle action error WC 8.7.0
private function handle_action_error( $action_id, $e, $context, $valid_action ) { if ( $valid_action ) { $this->store->mark_failure( $action_id ); /** * Runs when action execution fails. * * @param int $action_id Action ID. * @param Exception $e Exception instance. * @param string $context Execution context. */ do_action( 'action_scheduler_failed_execution', $action_id, $e, $context ); } else { /** * Runs when action validation fails. * * @param int $action_id Action ID. * @param Exception $e Exception instance. * @param string $context Execution context. */ do_action( 'action_scheduler_failed_validation', $action_id, $e, $context ); } }