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.

Метод класса: BatchProcessingController{}

No Hooks.

Return

null. Nothing.

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() WC 7.1.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 );
}