Automattic\WooCommerce\Internal\BatchProcessing

BatchProcessingController::enqueue_processor()publicWC 1.0

Enqueue a processor so that it will get batch processing requests from within scheduled actions.

Method of the class: BatchProcessingController{}

No Hooks.

Return

null. Nothing (null).

Usage

$BatchProcessingController = new BatchProcessingController();
$BatchProcessingController->enqueue_processor( $processor_class_name ): void;
$processor_class_name(string) (required)
Fully qualified class name of the processor, must implement BatchProcessorInterface.

BatchProcessingController::enqueue_processor() code WC 8.7.0

public function enqueue_processor( string $processor_class_name ): void {
	$pending_updates = $this->get_enqueued_processors();
	if ( ! in_array( $processor_class_name, array_keys( $pending_updates ), true ) ) {
		$pending_updates[] = $processor_class_name;
		$this->set_enqueued_processors( $pending_updates );
	}
	$this->schedule_watchdog_action( false, true );
}