From b694315fd71347b88100be2751e194699cf71bc5 Mon Sep 17 00:00:00 2001 From: vendidero Date: Fri, 26 Jan 2024 14:22:24 +0100 Subject: [PATCH] Do only load variation script in case Woo base script was loaded. --- woocommerce-germanized.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/woocommerce-germanized.php b/woocommerce-germanized.php index 17b95a877..0bdeb2de6 100644 --- a/woocommerce-germanized.php +++ b/woocommerce-germanized.php @@ -1064,15 +1064,6 @@ public function add_scripts() { } } - if ( is_product() ) { - $product = wc_get_product( $post->ID ); - - if ( $product && $product->is_type( 'variable' ) ) { - // Enqueue variation scripts - wp_enqueue_script( 'wc-gzd-add-to-cart-variation' ); - } - } - if ( apply_filters( 'woocommerce_gzd_refresh_unit_price_on_price_change', ( is_shop() || is_product() || is_product_category() || is_product_tag() ) ) ) { wp_enqueue_script( 'wc-gzd-unit-price-observer' ); }