woocommerce_batch_processor_watchdog_delay_seconds
Modify the delay interval for the batch processor's watchdog events.
Использование
add_filter( 'woocommerce_batch_processor_watchdog_delay_seconds', 'wp_kama_woocommerce_batch_processor_watchdog_delay_seconds_filter' );
/**
* Function for `woocommerce_batch_processor_watchdog_delay_seconds` filter-hook.
*
* @param int $delay Time, in seconds, before the watchdog process will run.
*
* @return int
*/
function wp_kama_woocommerce_batch_processor_watchdog_delay_seconds_filter( $delay ){
// filter...
return $delay;
}
- $delay(int)
- Time, in seconds, before the watchdog process will run.
По умолчанию: 3600 (1 hour)
Список изменений
| С версии 8.2.0 | Введена. |
Где вызывается хук
woocommerce_batch_processor_watchdog_delay_seconds
woocommerce/src/Internal/BatchProcessing/BatchProcessingController.php 123
$time += apply_filters( 'woocommerce_batch_processor_watchdog_delay_seconds', HOUR_IN_SECONDS );