BatchProcessorInterface::process_batch()publicWC 1.0

Process data for the supplied batch.

This method should be prepared to receive items that don't actually need processing (because they have been processed before) and ignore them, but if at least one of the batch items that actually need processing can't be processed, an exception should be thrown.

Once an item has been processed it shouldn't be counted in 'get_total_pending_count' nor included in 'get_next_batch_to_process' anymore (unless something happens that causes it to actually require further processing).

Method of the class: BatchProcessorInterface{}

No Hooks.


null. Nothing (null).


$BatchProcessorInterface = new BatchProcessorInterface();
$BatchProcessorInterface->process_batch( $batch ): void;
$batch(array) (required)
Batch to process, as returned by 'get_next_batch_to_process'.

BatchProcessorInterface::process_batch() code WC 8.9.0

public function process_batch( array $batch ): void;