Have ProductGallery object utilize arguments that are passed into it.

This commit is contained in:
Eric Defore 2019-01-18 12:20:13 -05:00
parent c1c8a88920
commit 148e308d38
2 changed files with 4 additions and 4 deletions

View File

@ -115,7 +115,7 @@ jQuery( function( $ ) {
this.openPhotoswipe = this.openPhotoswipe.bind( this );
if ( this.flexslider_enabled ) {
this.initFlexslider();
this.initFlexslider( args.flexslider );
$target.on( 'woocommerce_gallery_reset_slide_position', this.onResetSlidePosition );
} else {
this.$target.css( 'opacity', 1 );
@ -134,7 +134,7 @@ jQuery( function( $ ) {
/**
* Initialize flexSlider.
*/
ProductGallery.prototype.initFlexslider = function() {
ProductGallery.prototype.initFlexslider = function( args ) {
var $target = this.$target,
gallery = this;
@ -146,7 +146,7 @@ jQuery( function( $ ) {
after: function( slider ) {
gallery.initZoomForTarget( gallery.$images.eq( slider.currentSlide ) );
}
}, wc_single_product_params.flexslider );
}, args );
$target.flexslider( options );

File diff suppressed because one or more lines are too long