PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.0
ShopBuilder – WooCommerce Builder For Elementor v3.2.0
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Controllers/AssetsController.php +6 -28 3.4.23.2.0 View file →
@@ -137,18 +137,10 @@
137 137
138 138 $pro_version = defined( 'RTSBPRO_VERSION' ) ? RTSBPRO_VERSION : '0';
139 139 $addon_condition = version_compare( $pro_version, '1.9.0', '<' );
140 140
141 - $optimized = [];
142 -
143 141 if ( ! rtsb()->has_pro() && Fns::is_optimization_enabled() ) {
144 - $optimized = AssetRegistry::instance()->load_optimized_assets();
145 - }
146 -
147 - // An empty `src` means the bundle could not be built. Registering it would
148 - // produce a handle WordPress never prints, so use the unbundled assets.
149 - if ( ! empty( $optimized['src'] ) ) {
150 - $this->styles[] = $optimized;
142 + $this->styles[] = AssetRegistry::instance()->load_optimized_assets();
151 143 } else {
152 144 if ( $addon_condition ) {
153 145 $this->styles[] = [
154 146 'handle' => 'rtsb-general-addons',
@@ -280,17 +272,10 @@
280 272 'footer' => true,
281 273 ];
282 274 }
283 275
284 - $optimized = [];
285 -
286 276 if ( ! rtsb()->has_pro() && Fns::is_optimization_enabled() ) {
287 - $optimized = AssetRegistry::instance()->load_optimized_assets( 'js' );
288 - }
289 -
290 - // See get_public_styles(): an empty `src` means the bundle build failed.
291 - if ( ! empty( $optimized['src'] ) ) {
292 - $this->scripts[] = $optimized;
277 + $this->scripts[] = AssetRegistry::instance()->load_optimized_assets( 'js' );
293 278 } else {
294 279 $this->scripts[] = [
295 280 'handle' => 'rtsb-public',
296 281 'src' => rtsb()->get_assets_uri( 'js/frontend/frontend.js' ),
@@ -394,9 +379,8 @@
394 379 [
395 380 'ajaxUrl' => esc_url( self::$ajaxurl ),
396 381 'aiActivated' => ! empty( $ai_data ),
397 382 'homeurl' => home_url(),
398 - 'shopUrl' => function_exists( 'wc_get_page_permalink' ) ? esc_url( wc_get_page_permalink( 'shop' ) ) : home_url( '/' ),
399 383 'wcCartUrl' => wc_get_cart_url(),
400 384 'addedToCartText' => esc_html__( 'Product Added', 'shopbuilder' ),
401 385 'singleCartToastrText' => esc_html__( 'Successfully Added', 'shopbuilder' ),
402 386 'singleCartBtnText' => apply_filters( 'rtsb/global/single_add_to_cart_success', esc_html__( 'Added to Cart', 'shopbuilder' ) ),
@@ -405,9 +389,8 @@
405 389 'isOptimizationEnabled' => Fns::is_optimization_enabled(),
406 390 'isLoaderEnabled' => Fns::enable_loader(),
407 391 'notice' => [
408 392 'position' => Fns::get_option( 'general', 'notification', 'notification_position', 'center-center' ),
409 - 'timeOut' => absint( Fns::get_option( 'general', 'notification', 'notification_timeOut', 5 ) ),
410 393 ],
411 394 rtsb()->nonceId => wp_create_nonce( rtsb()->nonceText ),
412 395 ]
413 396 );
@@ -454,9 +437,8 @@
454 437 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
455 438 'nonce' => wp_create_nonce( rtsb()->nonceText ),
456 439 'pages' => Fns::get_pages(),
457 440 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
458 - 'validLicence' => Fns::has_valid_license() ? 'yes' : 'no',
459 441 'proVersion' => defined( 'RTSBPRO_VERSION' ) ? RTSBPRO_VERSION : '0',
460 442 'updateRates' => esc_html__( 'Update All Rates', 'shopbuilder' ),
461 443 'sections' => Settings::instance()->get_sections(),
462 444 'userRoles' => Fns::get_all_user_roles(),
@@ -564,16 +546,12 @@
564 546 wp_localize_script(
565 547 'rtsb-templatebuilder',
566 548 'rtsbParams',
567 549 [
568 - 'ajaxurl' => esc_url( self::$ajaxurl ),
569 - 'homeurl' => home_url(),
570 - rtsb()->nonceId => wp_create_nonce( rtsb()->nonceText ),
571 - 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
572 - 'singletonTypes' => apply_filters(
573 - 'rtsb/builder/singleton_types',
574 - array_keys( \RadiusTheme\SB\Helpers\BuilderFns::builder_page_types() )
575 - ),
550 + 'ajaxurl' => esc_url( self::$ajaxurl ),
551 + 'homeurl' => home_url(),
552 + rtsb()->nonceId => wp_create_nonce( rtsb()->nonceText ),
553 + 'hasPro' => rtsb()->has_pro() ? 'yes' : 'no',
576 554 ]
577 555 );
578 556 }
579 557 }