Skip to content

Commit

Permalink
Set allow one slide to false for flexslider
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jul 7, 2017
1 parent fe9dd86 commit 79e3bbd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/js/frontend/single-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jQuery( function( $ ) {
slideshow: wc_single_product_params.flexslider.slideshow,
animationSpeed: wc_single_product_params.flexslider.animationSpeed,
animationLoop: wc_single_product_params.flexslider.animationLoop, // Breaks photoswipe pagination if true.
allowOneSlide: wc_single_product_params.flexslider.allowOneSlide,
start: function() {
$target.css( 'opacity', 1 );
},
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/single-product.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions includes/class-wc-frontend-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ private static function get_script_data( $handle ) {
'slideshow' => false,
'animationSpeed' => 500,
'animationLoop' => false, // Breaks photoswipe pagination if true.
'allowOneSlide' => false,
) ),
'zoom_enabled' => apply_filters( 'woocommerce_single_product_zoom_enabled', get_theme_support( 'wc-product-gallery-zoom' ) ),
'photoswipe_enabled' => apply_filters( 'woocommerce_single_product_photoswipe_enabled', get_theme_support( 'wc-product-gallery-lightbox' ) ),
Expand Down

0 comments on commit 79e3bbd

Please sign in to comment.