Skip to content

Commit

Permalink
Do only load variation script in case Woo base script was loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisnissle committed Jan 26, 2024
1 parent 0d5d36d commit b694315
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions woocommerce-germanized.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
Expand Down

0 comments on commit b694315

Please sign in to comment.