• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WooCommerce a2z

WooCommerce a2z

WooCommerce

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / ActionScheduler_AsyncRequest_QueueRunner::allow() – Only allow async requests when needed.

You appear to be a bot. Output may be restricted

Description

Only allow async requests when needed.

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

Usage

ActionScheduler_AsyncRequest_QueueRunner::allow();

Parameters

Returns

void

Source

File name: woocommerce/packages/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php
Lines:

1 to 10 of 10
  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 );
  }
 

 View on GitHub View on Trac

Published: 6th April 2020 | Last updated: 6th April 2020

Primary Sidebar

Information

Function name: ActionScheduler_AsyncRequest_QueueRunner::allow
Class ref: ActionScheduler_AsyncRequest_QueueRunner
Plugin ref: WooCommerce
Version: 5.1.0
Sourcefile: packages/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php
File ref: packages/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php
Deprecated?: No
API Letters: A,Q

Footer

WooCommerce a2z
WooCommerce a2z
WooCommerce
WordPress 5.7
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  woocommerce.wp-a2z.org
© Copyright WooCommerce a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites