Automattic\WooCommerce\Internal\Logging

OrderLogsDeletionProcessor::get_next_batch_to_processpublicWC 1.0

Get the next batch of items to process. An item will be an associative array of 'order_id' and 'meta_value'.

Method of the class: OrderLogsDeletionProcessor{}

No Hooks.

Returns

Array.

Usage

$OrderLogsDeletionProcessor = new OrderLogsDeletionProcessor();
$OrderLogsDeletionProcessor->get_next_batch_to_process( $size ): array;
$size(int) (required)
Maximum size of the batch to return.

OrderLogsDeletionProcessor::get_next_batch_to_process() code WC 10.8.1

public function get_next_batch_to_process( int $size ): array {
	if ( $this->hpos_in_use ) {
		return $this->get_next_batch_to_process_hpos( $size );
	} elseif ( $this->cpt_in_use ) {
		return $this->get_next_batch_to_process_cpt( $size );
	} else {
		$this->throw_doing_it_wrong( StringUtil::class_name_without_namespace( __CLASS__ ) . '::' . __FUNCTION__ );
		return array();
	}
}