action_scheduler_recurring_action_failure_threshold хук-фильтрWC 1.0

Controls the failure threshold for recurring actions.

Before rescheduling a recurring action, we look at its status. If it failed, we then check if all of the most recent actions (upto the threshold set by this filter) sharing the same hook have also failed: if they have, that is considered consistent failure and a new instance of the action will not be scheduled.

Использование

add_filter( 'action_scheduler_recurring_action_failure_threshold', 'wp_kama_action_scheduler_recurring_failure_threshold_filter' );

/**
 * Function for `action_scheduler_recurring_action_failure_threshold` filter-hook.
 * 
 * @param int $failure_threshold Number of actions of the same hook to examine for failure.
 *
 * @return int
 */
function wp_kama_action_scheduler_recurring_failure_threshold_filter( $failure_threshold ){

	// filter...
	return $failure_threshold;
}
$failure_threshold(int)
Number of actions of the same hook to examine for failure.
По умолчанию: 5

Где вызывается хук

ActionScheduler_Abstract_QueueRunner::recurring_action_is_consistently_failing()
action_scheduler_recurring_action_failure_threshold
woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php 186
$consistent_failure_threshold = (int) apply_filters( 'action_scheduler_recurring_action_failure_threshold', 5 );

Где используется хук в WooCommerce

Использование не найдено.