| @@ -52,10 +52,8 @@ | ||
| 52 | 52 | 'woo-address-book/woocommerce-address-book.php' => PluginsSupport\WooAddressBook::class, |
| 53 | 53 | 'woo-product-variation-gallery/woo-product-variation-gallery.php' => PluginsSupport\RtwpvgSupport::class, |
| 54 | 54 | 'woo-product-variation-swatches-pro/woo-product-variation-swatches-pro.php' => PluginsSupport\RtwpvsSupport::class, |
| 55 | 55 | 'products-visibility-by-user-roles/addify_product_visibility.php' => PluginsSupport\AddifyVisibilityByRoles::class, |
| 56 | - 'woocommerce-payments/woocommerce-payments.php' => PluginsSupport\WooPaymentsSupport::class, | |
| 57 | - 'woocommerce-paypal-payments/woocommerce-paypal-payments.php' => PluginsSupport\PayPalPPCPSupport::class, | |
| 58 | 56 | ]; |
| 59 | 57 | $supports = apply_filters( 'rtsb/plugins/support', $supports ); |
| 60 | 58 | foreach ( $supports as $active_path => $class ) { |
| 61 | 59 | $is_active = in_array( $active_path, $active_plugin, true ); |
| @@ -103,10 +101,21 @@ | ||
| 103 | 101 | * |
| 104 | 102 | * @return string Modified or original template path. |
| 105 | 103 | */ |
| 106 | 104 | public function locate_template( $template, $template_name ) { |
| 107 | - if ( 'single-product/tabs/description.php' === $template_name && BuilderFns::is_product() ) { | |
| 105 | + if ( 'checkout/review-order.php' === $template_name && BuilderFns::is_checkout() ) { | |
| 106 | + $id = BuilderFns::is_builder_preview() ? get_the_ID() : BuilderFns::builder_page_id_by_type( 'checkout' ); | |
| 107 | + $elmap = ElementorDataMap::instance(); | |
| 108 | + if ( ! $id ) { | |
| 109 | + return $template; | |
| 110 | + } | |
| 111 | + $get_widget = $elmap->get_widget_data( 'rtsb-shipping-method', [], $id ); | |
| 112 | + if ( ! empty( $get_widget ) ) { | |
| 113 | + $template = Fns::locate_template( 'elementor/checkout/customized-order-review' ); | |
| 114 | + } | |
| 115 | + } elseif ( 'single-product/tabs/description.php' === $template_name && BuilderFns::is_product() ) { | |
| 108 | 116 | $template = Fns::locate_template( 'elementor/single-product/tab-description' ); |
| 109 | 117 | } |
| 118 | + | |
| 110 | 119 | return $template; |
| 111 | 120 | } |
| 112 | 121 | } |