woocommerce_product_feed_batch_time_limit
Filters the per-batch PHP execution time limit (in seconds) for product feed generation.
The limit is set up front and reset after each processed batch, so a low max_execution_time does not abort generation part-way through a chunk. Return 0 to leave the time limit untouched. This only affects PHP's own execution timeout, not Action Scheduler's failure period nor any hard server/host request timeout.
Usage
add_filter( 'woocommerce_product_feed_batch_time_limit', 'wp_kama_woocommerce_product_feed_batch_time_limit_filter' );
/**
* Function for `woocommerce_product_feed_batch_time_limit` filter-hook.
*
* @param int $batch_time_limit The per-batch time limit in seconds.
*
* @return int
*/
function wp_kama_woocommerce_product_feed_batch_time_limit_filter( $batch_time_limit ){
// filter...
return $batch_time_limit;
}
- $batch_time_limit(int)
- The per-batch time limit in seconds.
Changelog
| Since 11.0.0 | Introduced. |
Where the hook is called
woocommerce_product_feed_batch_time_limit
woocommerce/src/Internal/ProductFeed/Integrations/POSCatalog/AsyncGenerator.php 359
return (int) apply_filters( 'woocommerce_product_feed_batch_time_limit', 5 * MINUTE_IN_SECONDS );