WP_Background_Process::cancel_process()
Cancel Process
Description
Stop processing queue items, clear cronjob and delete batch.
Source
File: bp-core/libraries/wp-background-process.php
491 492 493 494 495 496 497 498 499 500 | 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 ); } } |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.