WC_Background_Process::kill_process()publicWC 1.0

Kill process.

Stop processing queue items, clear cronjob and delete all batches.

Method of the class: WC_Background_Process{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Background_Process = new WC_Background_Process();
$WC_Background_Process->kill_process();

WC_Background_Process::kill_process() code WC 8.7.0

public function kill_process() {
	if ( ! $this->is_queue_empty() ) {
		$this->delete_all_batches();
		wp_clear_scheduled_hook( $this->cron_hook_identifier );
	}
}