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

Chaining async requests can crash MySQL. A brief sleep call in PHP prevents that.

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

add_filter( 'action_scheduler_async_request_sleep_seconds', 'wp_kama_action_scheduler_async_request_sleep_seconds_filter', 10, 2 );

/**
 * Function for `action_scheduler_async_request_sleep_seconds` filter-hook.
 * 
 * @param  $5    
 * @param  $that 
 *
 * @return 
 */
function wp_kama_action_scheduler_async_request_sleep_seconds_filter( $5, $that ){

	// filter...
	return $5;
}
$5
-
$that
-

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

ActionScheduler_AsyncRequest_QueueRunner::get_sleep_seconds()
action_scheduler_async_request_sleep_seconds
woocommerce/packages/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php 95
return apply_filters( 'action_scheduler_async_request_sleep_seconds', 5, $this );

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

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