| @@ -9,9 +9,8 @@ | ||
| 9 | 9 | |
| 10 | 10 | defined( 'ABSPATH' ) || exit(); |
| 11 | 11 | |
| 12 | 12 | use RadiusTheme\SB\Helpers\Fns; |
| 13 | -use RadiusTheme\SBPRO\Helpers\FnsPro; | |
| 14 | 13 | use RadiusTheme\SB\Helpers\BuilderFns; |
| 15 | 14 | use RadiusTheme\SB\Traits\SingletonTrait; |
| 16 | 15 | |
| 17 | 16 | /** |
| @@ -55,9 +54,8 @@ | ||
| 55 | 54 | */ |
| 56 | 55 | public function product_page_body_class( $classes ) { |
| 57 | 56 | $classes[] = 'rtsb-shopbuilder-plugin rtsb_theme_' . rtsb()->current_theme; |
| 58 | 57 | if ( Fns::is_woocommerce() || BuilderFns::is_builder_preview() ) { |
| 59 | - $classes[] = 'woocommerce'; | |
| 60 | 58 | $classes[] = 'woocommerce-page'; |
| 61 | 59 | } |
| 62 | 60 | |
| 63 | 61 | if ( BuilderFns::is_product() ) { |
| @@ -69,8 +67,10 @@ | ||
| 69 | 67 | } |
| 70 | 68 | |
| 71 | 69 | if ( BuilderFns::is_cart() ) { |
| 72 | 70 | $classes[] = 'woocommerce-cart'; |
| 71 | + } else { | |
| 72 | + $classes[] = 'woocommerce'; | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if ( BuilderFns::is_checkout() ) { |
| 76 | 76 | $classes[] = 'woocommerce-checkout '; |
| @@ -75,11 +75,11 @@ | ||
| 75 | 75 | if ( BuilderFns::is_checkout() ) { |
| 76 | 76 | $classes[] = 'woocommerce-checkout '; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if ( rtsb()->has_pro() && class_exists( FnsPro::class ) ) { | |
| 80 | - $disable_cart = FnsPro::is_guest_feature_disabled( 'hide_cart_page', '' ); | |
| 81 | - $disable_checkout = FnsPro::is_guest_feature_disabled( 'hide_checkout_page', '' ); | |
| 79 | + if ( rtsb()->has_pro() ) { | |
| 80 | + $disable_cart = Fns::is_guest_feature_disabled( 'hide_cart_page', '' ); | |
| 81 | + $disable_checkout = Fns::is_guest_feature_disabled( 'hide_checkout_page', '' ); | |
| 82 | 82 | |
| 83 | 83 | if ( $disable_cart || $disable_checkout ) { |
| 84 | 84 | $classes[] = 'rtsb-not-visible'; |
| 85 | 85 | } |
| @@ -103,9 +103,9 @@ | ||
| 103 | 103 | $this->page_edit_with = Fns::page_edit_with( $this->builder_page_id ); |
| 104 | 104 | if ( $this->builder_page_id ) { |
| 105 | 105 | if ( did_action( 'elementor/loaded' ) && 'elementor' === $this->page_edit_with ) { |
| 106 | 106 | $this->elementor_frontend(); |
| 107 | - } else { | |
| 107 | + } elseif ( 'gutenberg' === $this->page_edit_with ) { | |
| 108 | 108 | $this->gutenberg_frontend(); |
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | } |
| @@ -146,10 +146,10 @@ | ||
| 146 | 146 | wp_enqueue_script( 'wc-checkout' ); |
| 147 | 147 | } elseif ( BuilderFns::is_cart() ) { |
| 148 | 148 | $type = 'cart'; |
| 149 | 149 | } |
| 150 | - wp_enqueue_style( 'rtsb-frontend' ); | |
| 151 | - wp_enqueue_script( 'rtsb-public' ); | |
| 150 | + wp_enqueue_style( Fns::optimized_handle( 'rtsb-frontend' ) ); | |
| 151 | + wp_enqueue_script( Fns::optimized_handle( 'rtsb-public' ) ); | |
| 152 | 152 | |
| 153 | 153 | return apply_filters( 'rtsb/builder/set/current/page/type/external', $type ); |
| 154 | 154 | } |
| 155 | 155 | |