WordPress at Your Fingertips
function is not described

WC_Background_Updater::handle_cron_healthcheck() public WC 1.0

Handle cron healthcheck

Restart the background process if not already running and data exists in the queue.

{} It's a method of the class: WC_Background_Updater{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Background_Updater = new WC_Background_Updater();
$WC_Background_Updater->handle_cron_healthcheck();

Code of WC_Background_Updater::handle_cron_healthcheck() WC 5.7.0

public function handle_cron_healthcheck() {
	if ( $this->is_process_running() ) {
		// Background process already running.
		return;
	}

	if ( $this->is_queue_empty() ) {
		// No data to process.
		$this->clear_scheduled_event();
		return;
	}

	$this->handle();
}