Automattic\WooCommerce\Internal\BatchProcessing
BatchProcessingController::enqueue_processor
Enqueue a processor so that it will get batch processing requests from within scheduled actions.
Method of the class: BatchProcessingController{}
No Hooks.
Returns
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() BatchProcessingController::enqueue processor code WC 10.8.1
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 );
}