PluginProbe
Booster for WooCommerce – PDF Invoices, Abandoned Cart, Variation Swatches & 100+ Tools / 8.0.2
Booster for WooCommerce – PDF Invoices, Abandoned Cart, Variation Swatches & 100+ Tools v8.0.2
8.3.0 8.2.0 8.1.0 8.0.2 trunk 4.0.1 4.1.0 4.2.0 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.6.0 4.6.1 4.7.0 4.7.1 4.8.0 4.9.0 5.0.0 5.1.0 5.1.1 5.2.0 5.2.1 All 106 releases
woocommerce-jetpack / woocommerce-jetpack.php

woocommerce-jetpack.php in Booster for WooCommerce – PDF Invoices, Abandoned Cart, Variation Swatches & 100+ Tools 8.0.2, at woocommerce-jetpack.php

157 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName
2 /**
3 * Plugin Name: Booster for WooCommerce
4 * Requires Plugins: woocommerce
5 * Plugin URI: https://booster.io
6 * Description: Supercharge your WooCommerce site with these awesome powerful features.
7 * Version: 8.0.2
8 * Author: Pluggabl LLC
9 * Author URI: https://booster.io
10 * Text Domain: woocommerce-jetpack
11 * Domain Path: /langs
12 * WC tested up to: 10.8.1
13 * License: GNU General Public License v3.0
14 *
15 * @package Booster_For_WooCommerce
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 // Core functions.
23 require_once 'includes/functions/wcj-functions-core.php';
24
25 // Check if WooCommerce is active.
26 if ( ! wcj_is_plugin_activated( 'woocommerce', 'woocommerce.php' ) ) {
27 return;
28 }
29
30 // Declare WooCommerce HPOS compatibility.
31 add_action(
32 'before_woocommerce_init',
33 function () {
34 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
35 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
36 'custom_order_tables',
37 __FILE__,
38 true
39 );
40 }
41 }
42 );
43
44 // Prevent loading if paid versions are active.
45 if (
46 'woocommerce-jetpack.php' === basename( __FILE__ ) &&
47 (
48 wcj_is_plugin_activated( 'booster-plus-for-woocommerce', 'booster-plus-for-woocommerce.php' ) ||
49 wcj_is_plugin_activated( 'booster-elite-for-woocommerce', 'booster-elite-for-woocommerce.php' ) ||
50 wcj_is_plugin_activated( 'booster-basic-for-woocommerce', 'booster-basic-for-woocommerce.php' ) ||
51 wcj_is_plugin_activated( 'booster-pro-for-woocommerce', 'booster-pro-for-woocommerce.php' )
52 )
53 ) {
54 return;
55 }
56
57 if ( ! defined( 'WCJ_FREE_PLUGIN_FILE' ) ) {
58 define( 'WCJ_FREE_PLUGIN_FILE', __FILE__ );
59 }
60
61 if ( ! class_exists( 'WC_Jetpack' ) ) :
62
63 /**
64 * Main Booster for WooCommerce class.
65 *
66 * @since 1.0.0
67 */
68 final class WC_Jetpack {
69
70 /**
71 * Plugin version.
72 *
73 * @var string
74 */
75 public $version = '8.0.2';
76
77 /**
78 * Singleton instance.
79 *
80 * @var WC_Jetpack|null
81 */
82 protected static $instances = null;
83
84 /**
85 * Plugin options.
86 *
87 * @var array
88 */
89 public $options = array();
90
91 /**
92 * Registered shortcodes.
93 *
94 * @var array
95 */
96 public $shortcodes = array();
97
98 /**
99 * Active modules.
100 *
101 * @var array
102 */
103 public $modules = array();
104
105 /**
106 * All available modules.
107 *
108 * @var array
109 */
110 public $all_modules = array();
111
112 /**
113 * Module statuses.
114 *
115 * @var array
116 */
117 public $module_statuses = array();
118
119 /**
120 * Get main instance (Singleton).
121 *
122 * @return WC_Jetpack
123 */
124 public static function instance() {
125 if ( is_null( self::$instances ) ) {
126 self::$instances = new self();
127 }
128 return self::$instances;
129 }
130
131 /**
132 * Class constructor.
133 */
134 public function __construct() {
135 include_once 'includes/core/wcj-loader.php';
136 }
137 }
138
139 endif;
140
141 // Load procedural functions.
142 require_once __DIR__ . '/includes/wcj-free-functions.php';
143
144 // Plugin usage tracking.
145 if ( ! class_exists( 'Plugin_Usage_Tracker' ) ) {
146 include_once __DIR__ . '/tracking/class-plugin-usage-tracker.php';
147 }
148
149 // Hooks.
150 add_action( 'plugins_loaded', 'w_c_j' );
151 register_uninstall_hook( __FILE__, 'wcj_delete_free_plugin_database_option' );
152 register_activation_hook( __FILE__, 'wcj_set_activation_redirect_free' );
153 add_action( 'admin_init', 'wcj_redirect_after_first_activation_free' );
154
155 // Start tracking.
156 woocommerce_jetpack_start_plugin_tracking();
157