woocommerce_product_feed_batch_size
Filters the number of products fetched per database query during feed generation.
This is the granularity within a chunk; see woocommerce_product_feed_chunk_size how many products each Action Scheduler action processes.
Usage
add_filter( 'woocommerce_product_feed_batch_size', 'wp_kama_woocommerce_product_feed_batch_size_filter' );
/**
* Function for `woocommerce_product_feed_batch_size` filter-hook.
*
* @param int $batch_size The number of products per database batch.
*
* @return int
*/
function wp_kama_woocommerce_product_feed_batch_size_filter( $batch_size ){
// filter...
return $batch_size;
}
- $batch_size(int)
- The number of products per database batch.
Changelog
| Since 11.0.0 | Introduced. |
Where the hook is called
woocommerce_product_feed_batch_size
woocommerce/src/Internal/ProductFeed/Integrations/POSCatalog/AsyncGenerator.php 482
$batch_size = (int) apply_filters( 'woocommerce_product_feed_batch_size', self::BATCH_SIZE );