ActionScheduler_AsyncRequest_QueueRunner::maybe_dispatch
If the async request runner is needed and allowed to run, dispatch a request.
Method of the class: ActionScheduler_AsyncRequest_QueueRunner{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ActionScheduler_AsyncRequest_QueueRunner = new ActionScheduler_AsyncRequest_QueueRunner(); $ActionScheduler_AsyncRequest_QueueRunner->maybe_dispatch();
ActionScheduler_AsyncRequest_QueueRunner::maybe_dispatch() ActionScheduler AsyncRequest QueueRunner::maybe dispatch code WC 10.5.0
public function maybe_dispatch() {
if ( ! $this->allow() ) {
return;
}
$this->dispatch();
ActionScheduler_QueueRunner::instance()->unhook_dispatch_async_request();
}