Automattic\WooCommerce\Internal\BatchProcessing

BatchProcessingController::get_process_details()privateWC 1.0

Get the current state for a given enqueued processor.

Method of the class: BatchProcessingController{}

No Hooks.

Return

Array. Current state for the processor, or a "blank" state if none exists yet.

Usage

// private - for code of main (parent) class only
$result = $this->get_process_details( $batch_processor ): array;
$batch_processor(BatchProcessorInterface) (required)
Batch processor instance.

BatchProcessingController::get_process_details() code WC 8.7.0

private function get_process_details( BatchProcessorInterface $batch_processor ): array {
	return get_option(
		$this->get_processor_state_option_name( $batch_processor ),
		array(
			'total_time_spent'   => 0,
			'current_batch_size' => $batch_processor->get_default_batch_size(),
			'last_error'         => null,
		)
	);
}