PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.2
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
← All changes | inc/class-merchant-loader.php +17 -0 2.3.02.3.2 View file →
@@ -32,8 +32,10 @@
32 32 public function __construct() {
33 33 // Includes.
34 34 $this->includes();
35 35
36 + add_action( 'plugins_loaded', array( $this, 'maybe_define_awl_constant' ), 5 );
37 +
36 38 // Register scripts.
37 39 add_action( 'wp_enqueue_scripts', array( $this, 'register_global_js_and_css' ) );
38 40
39 41 // Enqueue scripts.
@@ -156,8 +158,23 @@
156 158 *
157 159 * @since 1.0
158 160 */
159 161 do_action( 'merchant_admin_after_include_modules_classes' );
162 + }
163 +
164 + /**
165 + * Define MERCHANT_AWL_ACTIVE when White Label is applied.
166 + *
167 + * @return void
168 + */
169 + public function maybe_define_awl_constant() {
170 + if ( defined( 'MERCHANT_AWL_ACTIVE' ) ) {
171 + return;
172 + }
173 +
174 + if ( merchant_white_label_is_applied() ) {
175 + define( 'MERCHANT_AWL_ACTIVE', true );
176 + }
160 177 }
161 178
162 179 /**
163 180 * Add to body class.