Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog

AsyncGenerator::get_batch_size │ private │ WC 1.0

Returns the number of products fetched per database batch.

Метод класса: AsyncGenerator{}

Хуки из метода

Возвращает

int. The batch size (at least 1).

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

// private - только в коде основоного (родительского) класса
$result = $this->get_batch_size(): int;

Код AsyncGenerator::get_batch_size() WC 11.2.2

private function get_batch_size(): int {
	/**
	 * 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` for how many
	 * products each Action Scheduler action processes.
	 *
	 * @param int $batch_size The number of products per database batch.
	 *
	 * @since 11.0.0
	 */
	$batch_size = (int) apply_filters( 'woocommerce_product_feed_batch_size', self::BATCH_SIZE );

	return (int) max( 1, $batch_size );
}