Automattic\WooCommerce\Internal\BatchProcessing

BatchProcessingController::handle_watchdog_action()privateWC 1.0

Schedule a processing action for all the processors that are enqueued but not scheduled (because they have just been enqueued, or because the processing for a batch failed).

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->handle_watchdog_action(): void;

Code of BatchProcessingController::handle_watchdog_action() WC 7.1.0

private function handle_watchdog_action(): void {
	$pending_processes = $this->get_enqueued_processors();
	if ( empty( $pending_processes ) ) {
		return;
	}
	foreach ( $pending_processes as $process_name ) {
		if ( ! $this->is_scheduled( $process_name ) ) {
			$this->schedule_batch_processing( $process_name );
		}
	}
	$this->schedule_watchdog_action( true );
}