Automattic\WooCommerce\Internal\BatchProcessing

BatchProcessingController::schedule_batch_processing()privateWC 1.0

Schedule a processing action for a single processor.

Method of the class: BatchProcessingController{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->schedule_batch_processing( $processor_class_name, $with_delay ) : void;
$processor_class_name(string) (required)
Fully qualified class name of the processor.
$with_delay(true|false)
Whether to schedule the action for immediate execution or for later.
Default: false

BatchProcessingController::schedule_batch_processing() code WC 8.7.0

private function schedule_batch_processing( string $processor_class_name, bool $with_delay = false ) : void {
	$time = $with_delay ? time() + MINUTE_IN_SECONDS : time();
	as_schedule_single_action( $time, self::PROCESS_SINGLE_BATCH_ACTION_NAME, array( $processor_class_name ) );
}