Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog

AsyncGenerator::get_effective_chunk_sizeprivateWC 1.0

Returns the effective chunk size (products per action) currently in use for a feed.

Method of the class: AsyncGenerator{}

No Hooks.

Returns

Int. The effective chunk size, defaulting to the largest configured step.

Usage

// private - for code of main (parent) class only
$result = $this->get_effective_chunk_size( $option_key ): int;
$option_key(string) (required)
The option key for the feed generation status.

AsyncGenerator::get_effective_chunk_size() code WC 11.0.0

private function get_effective_chunk_size( string $option_key ): int {
	$chunk_size = (int) get_option( $this->get_chunk_size_option_key( $option_key ), self::CHUNK_SIZE_STEPS[0] );

	return $chunk_size > 0 ? $chunk_size : self::CHUNK_SIZE_STEPS[0];
}