mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-13 21:02:55 +00:00
2.4.5
This commit is contained in:

committed by
Remco Tolsma

parent
37367ac369
commit
721dda6e5c
12
includes/libraries/action-scheduler/classes/ActionScheduler.php
Executable file → Normal file
12
includes/libraries/action-scheduler/classes/ActionScheduler.php
Executable file → Normal file
@@ -59,7 +59,9 @@ abstract class ActionScheduler {
|
||||
|
||||
public static function autoload( $class ) {
|
||||
$d = DIRECTORY_SEPARATOR;
|
||||
if ( strpos( $class, 'ActionScheduler' ) === 0 ) {
|
||||
if ( 'Deprecated' === substr( $class, -10 ) ) {
|
||||
$dir = self::plugin_path('deprecated'.$d);
|
||||
} elseif ( strpos( $class, 'ActionScheduler' ) === 0 ) {
|
||||
$dir = self::plugin_path('classes'.$d);
|
||||
} elseif ( strpos( $class, 'CronExpression' ) === 0 ) {
|
||||
$dir = self::plugin_path('lib'.$d.'cron-expression'.$d);
|
||||
@@ -67,8 +69,8 @@ abstract class ActionScheduler {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( file_exists( $dir.$class.'.php' ) ) {
|
||||
include( $dir.$class.'.php' );
|
||||
if ( file_exists( "{$dir}{$class}.php" ) ) {
|
||||
include( "{$dir}{$class}.php" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -97,6 +99,10 @@ abstract class ActionScheduler {
|
||||
|
||||
require_once( self::plugin_path('functions.php') );
|
||||
|
||||
if ( apply_filters( 'action_scheduler_load_deprecated_functions', true ) ) {
|
||||
require_once( self::plugin_path('deprecated/functions.php') );
|
||||
}
|
||||
|
||||
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
||||
WP_CLI::add_command( 'action-scheduler', 'ActionScheduler_WPCLI_Scheduler_command' );
|
||||
}
|
||||
|
Reference in New Issue
Block a user