v1.9.0
This commit is contained in:
parent
7f89e98bbc
commit
a558ac478c
1 changed files with 17935 additions and 56 deletions
|
|
@ -14,9 +14,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
/**
|
||||
* Thin wrapper around Action Scheduler that namespaces all jobs under a single group.
|
||||
*
|
||||
* Action Scheduler is declared as a required plugin (Requires Plugins: action-scheduler)
|
||||
* so its functions are always available at runtime. The is_available() guard is kept
|
||||
* for defensive unit-test scenarios only.
|
||||
* Action Scheduler is bundled via Composer (woocommerce/action-scheduler) and
|
||||
* loaded from the main plugin file, so its functions are always available at
|
||||
* runtime. The is_available() guard is kept for defensive unit-test scenarios
|
||||
* only.
|
||||
*/
|
||||
class Scheduler {
|
||||
|
||||
|
|
@ -31,7 +32,9 @@ class Scheduler {
|
|||
* @return bool
|
||||
*/
|
||||
public static function is_available(): bool {
|
||||
return function_exists( 'as_schedule_single_action' );
|
||||
return function_exists( 'as_schedule_single_action' )
|
||||
&& function_exists( 'as_has_scheduled_action' )
|
||||
&& function_exists( 'as_unschedule_all_actions' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue