WC_Background_Process::kill_process
Kill process.
Stop processing queue items, clear cronjob and delete all batches.
Method of the class: WC_Background_Process{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Background_Process = new WC_Background_Process(); $WC_Background_Process->kill_process();
WC_Background_Process::kill_process() WC Background Process::kill process code WC 10.7.0
public function kill_process() {
if ( ! $this->is_queue_empty() ) {
$this->delete_all_batches();
wp_clear_scheduled_hook( $this->cron_hook_identifier );
}
}