Automattic\WooCommerce\Internal\DataStores\Orders

DataSynchronizer::get_default_batch_size()publicWC 1.0

Default batch size to use.

Method of the class: DataSynchronizer{}

Return

Int. Default batch size.

Usage

$DataSynchronizer = new DataSynchronizer();
$DataSynchronizer->get_default_batch_size(): int;

DataSynchronizer::get_default_batch_size() code WC 8.7.0

public function get_default_batch_size(): int {
	$batch_size = self::ORDERS_SYNC_BATCH_SIZE;

	if ( $this->custom_orders_table_is_authoritative() ) {
		// Back-filling is slower than migration.
		$batch_size = absint( self::ORDERS_SYNC_BATCH_SIZE / 10 ) + 1;
	}
	/**
	 * Filter to customize the count of orders that will be synchronized in each step of the custom orders table to/from posts table synchronization process.
	 *
	 * @since 6.6.0
	 *
	 * @param int Default value for the count.
	 */
	return apply_filters( 'woocommerce_orders_cot_and_posts_sync_step_size', $batch_size );
}