Automattic\WooCommerce\Internal\DataStores\Orders

LegacyDataCleanup::get_next_batch_to_processpublicWC 1.0

Returns the batch with records that needs to be processed for a given size.

Method of the class: LegacyDataCleanup{}

No Hooks.

Returns

Array. Batch of records.

Usage

$LegacyDataCleanup = new LegacyDataCleanup();
$LegacyDataCleanup->get_next_batch_to_process( $size ): array;
$size(int) (required)
Size of the batch.

LegacyDataCleanup::get_next_batch_to_process() code WC 10.3.6

public function get_next_batch_to_process( int $size ): array {
	return $this->can_run()
		? array_map( 'absint', $this->legacy_handler->get_orders_for_cleanup( array(), $size ) )
		: array();
}