WP_Background_Process::cancel_process()

Cancel Process


Description

Stop processing queue items, clear cronjob and delete batch.


Source

File: classes/library/batch-processing/wp-background-process.php

		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 );
			}

		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.