ActionScheduler_Abstract_QueueRunner::schedule_next_instance()
Schedule the next instance of the action if necessary.
Метод класса: ActionScheduler_Abstract_QueueRunner{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->schedule_next_instance( $action, $action_id );
- $action(ActionScheduler_Action) (обязательный)
- Action.
- $action_id(int) (обязательный)
- Action ID.
Код ActionScheduler_Abstract_QueueRunner::schedule_next_instance() ActionScheduler Abstract QueueRunner::schedule next instance WC 9.8.2
protected function schedule_next_instance( ActionScheduler_Action $action, $action_id ) { // If a recurring action has been consistently failing, we may wish to stop rescheduling it. if ( ActionScheduler_Store::STATUS_FAILED === $this->store->get_status( $action_id ) && $this->recurring_action_is_consistently_failing( $action, $action_id ) ) { ActionScheduler_Logger::instance()->log( $action_id, __( 'This action appears to be consistently failing. A new instance will not be scheduled.', 'woocommerce' ) ); return; } try { ActionScheduler::factory()->repeat( $action ); } catch ( Exception $e ) { do_action( 'action_scheduler_failed_to_schedule_next_instance', $action_id, $e, $action ); } }