ActionScheduler_AsyncRequest_QueueRunner::allow()protectedWC 1.0

Only allow async requests when needed.

Also allow 3rd party code to disable running actions via async requests.

Метод класса: ActionScheduler_AsyncRequest_QueueRunner{}

Хуки из метода

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->allow();

Код ActionScheduler_AsyncRequest_QueueRunner::allow() WC 8.7.0

protected function allow() {

	if ( ! has_action( 'action_scheduler_run_queue' ) || ActionScheduler::runner()->has_maximum_concurrent_batches() || ! $this->store->has_pending_actions_due() ) {
		$allow = false;
	} else {
		$allow = true;
	}

	return apply_filters( 'action_scheduler_allow_async_request_runner', $allow );
}