PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.4
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.4
1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk 1.2.0 All 47 releases
fluent-cart / boot / action_scheduler_loader.php

action_scheduler_loader.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.6.4, at boot/action_scheduler_loader.php

41 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined('ABSPATH') or die;
2
3 if (!function_exists('fluent_cart_scheduler_register') && function_exists('add_action')) { // WRCS: DEFINED_VERSION.
4 if (!class_exists('ActionScheduler_Versions', false)) {
5 require_once FLUENTCART_PLUGIN_PATH . 'vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php';
6 add_action('plugins_loaded', array('ActionScheduler_Versions', 'initialize_latest_version'), 1, 0);
7 }
8
9 add_action('plugins_loaded', 'fluent_cart_scheduler_register', 0, 0); // WRCS: DEFINED_VERSION.
10
11 /**
12 * Registers this version of Action Scheduler.
13 */
14 function fluent_cart_scheduler_register()
15 { // WRCS: DEFINED_VERSION.
16 $versions = ActionScheduler_Versions::instance();
17 $versions->register('3.9.2', 'fluent_cart_scheduler_initialize'); // WRCS: DEFINED_VERSION.
18 }
19
20 /**
21 * Initializes this version of Action Scheduler.
22 */
23 function fluent_cart_scheduler_initialize()
24 { // WRCS: DEFINED_VERSION.
25 // A final safety check is required even here, because historic versions of Action Scheduler
26 // followed a different pattern (in some unusual cases, we could reach this point and the
27 // ActionScheduler class is already defined—so we need to guard against that).
28 if (!class_exists('ActionScheduler', false)) {
29 require_once FLUENTCART_PLUGIN_PATH . 'vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php';
30 ActionScheduler::init(FLUENTCART_PLUGIN_PATH . 'vendor/woocommerce/action-scheduler/action-scheduler.php');
31 }
32 }
33
34 // Support usage in themes - load this version if no plugin has loaded a version yet.
35 if (did_action('plugins_loaded') && !doing_action('plugins_loaded') && !class_exists('ActionScheduler', false)) {
36 fluent_cart_scheduler_initialize(); // WRCS: DEFINED_VERSION.
37 do_action('action_scheduler_pre_theme_init');
38 ActionScheduler_Versions::initialize_latest_version();
39 }
40 }
41