Automattic\WooCommerce\Internal\BatchProcessing
BatchProcessorInterface::get_next_batch_to_process()
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() BatchProcessorInterface::get next batch to process WC 9.2.3
public function get_next_batch_to_process( int $size ) : array;