ActionScheduler_AsyncRequest_QueueRunner::maybe_dispatch()publicWC 1.0

If the async request runner is needed and allowed to run, dispatch a request.

Method of the class: ActionScheduler_AsyncRequest_QueueRunner{}

No Hooks.

Return

null. Nothing (null).

Usage

$ActionScheduler_AsyncRequest_QueueRunner = new ActionScheduler_AsyncRequest_QueueRunner();
$ActionScheduler_AsyncRequest_QueueRunner->maybe_dispatch();

ActionScheduler_AsyncRequest_QueueRunner::maybe_dispatch() code WC 8.7.0

public function maybe_dispatch() {
	if ( ! $this->allow() ) {
		return;
	}

	$this->dispatch();
	ActionScheduler_QueueRunner::instance()->unhook_dispatch_async_request();
}