Automattic\WooCommerce\Internal\BatchProcessing

BatchProcessorInterface::get_next_batch_to_process()publicWC 1.0

Returns the next batch of items that need to be processed.

A batch item can be anything needed to identify the actual processing to be done, but whenever possible items should be numbers (e.g. database record ids) or at least strings, to ease troubleshooting and logging in case of problems.

The size of the batch returned can be less than $size if there aren't that many items pending processing (and it can be zero if there isn't anything to process), but the size should always be consistent with what 'get_total_pending_count' returns (i.e. the size of the returned batch shouldn't be larger than the pending items count).

{} Это метод класса: BatchProcessorInterface{}

Хуков нет.

Возвращает

Массив. Batch of items to process, containing $size or less items.

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

$BatchProcessorInterface = new BatchProcessorInterface();
$BatchProcessorInterface->get_next_batch_to_process( $size ) : array;
$size(int) (обязательный)
Maximum size of the batch to be returned.

Код BatchProcessorInterface::get_next_batch_to_process() WC 6.9.4

public function get_next_batch_to_process( int $size ) : array;