WP_Background_Process::cancel_process()
Cancel Process
Stop processing queue items, clear cronjob and delete batch.
Метод класса: WP_Background_Process{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WP_Background_Process = new WP_Background_Process(); $WP_Background_Process->cancel_process();
Код WP_Background_Process::cancel_process() WP Background Process::cancel process WC 8.7.0
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 ); } }