Merge pull request #17196 from woocommerce/fix/zoom-for-target-function

Check zoom is enabled before running initZoomForTarget
This commit is contained in:
Gerhard Potgieter 2017-10-13 17:56:30 +02:00 committed by GitHub
commit 8f16affe73
2 changed files with 5 additions and 1 deletions

View File

@ -183,6 +183,10 @@ jQuery( function( $ ) {
* Init zoom.
*/
ProductGallery.prototype.initZoomForTarget = function( zoomTarget ) {
if ( ! this.zoom_enabled ) {
return false;
}
var galleryWidth = this.$target.width(),
zoomEnabled = false;

File diff suppressed because one or more lines are too long