Skip to content

Commit 66056ff

Browse files
fix: make gallery slider compatible with sparks
1 parent 20b367d commit 66056ff

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

assets/js/src/shop/app.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import { tns } from 'tiny-slider/src/tiny-slider';
2020

2121
if (
2222
$body.hasClass('single-product') &&
23-
!$body.hasClass('sp-ct-enabled')
23+
!$body.hasClass('sp-ct-enabled') &&
24+
!$body.hasClass('nv-left-gallery')
2425
) {
2526
handleGallerySlider();
2627
}

assets/scss/components/compat/woocommerce/_sidebar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858
}
5959

60-
body:not(.nv-left-gallery) {
60+
body:not(.nv-left-gallery, .sp-slider-gallery) {
6161

6262
.tns-ovh {
6363
display: flex;

inc/core/front_end.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ private function add_scripts() {
462462
}
463463

464464
if ( class_exists( 'WooCommerce', false ) && is_woocommerce() ) {
465-
wp_register_script( 'neve-shop-script', NEVE_ASSETS_URL . 'js/build/modern/shop.js', array( 'jquery' ), NEVE_VERSION, true );
465+
wp_register_script( 'neve-shop-script', NEVE_ASSETS_URL . 'js/build/modern/shop.js', array( 'jquery', 'wc-single-product' ), NEVE_VERSION, true );
466466
wp_enqueue_script( 'neve-shop-script' );
467467
wp_script_add_data( 'neve-shop-script', 'async', true );
468468
}

0 commit comments

Comments
 (0)