WP_Background_Process::maybe_handle()
Maybe process queue
Checks whether data exists within the queue and that the process is not already running.
Method of the class: WP_Background_Process{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Background_Process = new WP_Background_Process(); $WP_Background_Process->maybe_handle();
WP_Background_Process::maybe_handle() WP Background Process::maybe handle code WC 9.3.1
public function maybe_handle() { // Don't lock up other requests while processing session_write_close(); if ( $this->is_process_running() ) { // Background process already running. wp_die(); } if ( $this->is_queue_empty() ) { // No data to process. wp_die(); } check_ajax_referer( $this->identifier, 'nonce' ); $this->handle(); wp_die(); }