WP_Background_Process::cancel_process()
Cancel Process
Stop processing queue items, clear cronjob and delete batch.
Method of the class: WP_Background_Process{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Background_Process = new WP_Background_Process(); $WP_Background_Process->cancel_process();
WP_Background_Process::cancel_process() WP Background Process::cancel process code WC 9.4.2
public function cancel_process() { if ( ! $this->is_queue_empty() ) { $batch = $this->get_batch(); $this->delete( $batch->key ); wp_clear_scheduled_hook( $this->cron_hook_identifier ); } }