YITH WooCommerce Zoom Magnifier - Version 1.2.28

Version Description

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Zoom Magnifier
Version 1.2.28
Comparing to
See all releases

Code changes from version 1.2.27 to 1.2.28

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: zoom, magnifier, woocommerce, product image, themes, yit, e-commerce, shop, thumbnail, thumbnail slider, zoom image, carousel, image carousel
5
  Requires at least: 3.5.1
6
  Tested up to: 4.7.3
7
- Stable tag: 1.2.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -51,6 +51,10 @@ YITH WooCommerce Zoom Magnifier will add a new tab called "Zoom Magnifier" in "Y
51
 
52
  == Changelog ==
53
 
 
 
 
 
54
  = Version 1.2.27 - Released: Apr 05, 2017 =
55
 
56
  * Fix: Variation images not shown properly.
4
  Tags: zoom, magnifier, woocommerce, product image, themes, yit, e-commerce, shop, thumbnail, thumbnail slider, zoom image, carousel, image carousel
5
  Requires at least: 3.5.1
6
  Tested up to: 4.7.3
7
+ Stable tag: 1.2.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
51
 
52
  == Changelog ==
53
 
54
+ = Version 1.2.28 - Released: Apr 06, 2017 =
55
+
56
+ * Fix: Javascript error when a product variation do not have its own image set.
57
+
58
  = Version 1.2.27 - Released: Apr 05, 2017 =
59
 
60
  * Fix: Variation images not shown properly.
assets/js/ywzm_frontend.js CHANGED
@@ -13,7 +13,7 @@ jQuery(document).ready(function ($) {
13
  var yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href');
14
  var yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
15
 
16
- if( typeof yith_magnifier_options == 'undefined' ) {
17
  return false;
18
  }
19
 
@@ -24,8 +24,10 @@ jQuery(document).ready(function ($) {
24
  var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
25
 
26
  var image_src = yith_wcmg_default_image;
27
- if (ywzm_data.wc_before_3_0 && variation.image_src) {
28
- image_src = variation.image_src;
 
 
29
  }
30
  else if (variation.image.src) {
31
  image_src = variation.image.src;
13
  var yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href');
14
  var yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
15
 
16
+ if (typeof yith_magnifier_options == 'undefined') {
17
  return false;
18
  }
19
 
24
  var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
25
 
26
  var image_src = yith_wcmg_default_image;
27
+ if (ywzm_data.wc_before_3_0) {
28
+ if (variation.image_src) {
29
+ image_src = variation.image_src;
30
+ }
31
  }
32
  else if (variation.image.src) {
33
  image_src = variation.image.src;
assets/js/ywzm_frontend.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){var b=a(".images"),c=a(".yith_magnifier_zoom"),d=a(".yith_magnifier_zoom img").first(),e=b.find(".yith_magnifier_zoom").attr("href"),f=b.find(".yith_magnifier_zoom img").attr("src");if("undefined"==typeof yith_magnifier_options)return!1;b.yith_magnifier(yith_magnifier_options),a(document).on("found_variation","form.variations_form",function(a,g){var h=g.image_magnifier?g.image_magnifier:e,i=f;ywzm_data.wc_before_3_0&&g.image_src?i=g.image_src:g.image.src&&(i=g.image.src),c.attr("href",h),d.attr("src",i),d.attr("srcset",i),d.attr("src-orig",i),b.data("yith_magnifier")&&b.yith_magnifier("destroy"),b.yith_magnifier(yith_magnifier_options)}).on("reset_image",function(a){c.attr("href",e),d.attr("src",f),d.attr("srcset",f),d.attr("src-orig",f),b.data("yith_magnifier")&&b.yith_magnifier("destroy"),b.yith_magnifier(yith_magnifier_options)}),a("form.variations_form .variations select").trigger("change")});
1
+ jQuery(document).ready(function(a){var b=a(".images"),c=a(".yith_magnifier_zoom"),d=a(".yith_magnifier_zoom img").first(),e=b.find(".yith_magnifier_zoom").attr("href"),f=b.find(".yith_magnifier_zoom img").attr("src");if("undefined"==typeof yith_magnifier_options)return!1;b.yith_magnifier(yith_magnifier_options),a(document).on("found_variation","form.variations_form",function(a,g){var h=g.image_magnifier?g.image_magnifier:e,i=f;ywzm_data.wc_before_3_0?g.image_src&&(i=g.image_src):g.image.src&&(i=g.image.src),c.attr("href",h),d.attr("src",i),d.attr("srcset",i),d.attr("src-orig",i),b.data("yith_magnifier")&&b.yith_magnifier("destroy"),b.yith_magnifier(yith_magnifier_options)}).on("reset_image",function(a){c.attr("href",e),d.attr("src",f),d.attr("srcset",f),d.attr("src-orig",f),b.data("yith_magnifier")&&b.yith_magnifier("destroy"),b.yith_magnifier(yith_magnifier_options)}),a("form.variations_form .variations select").trigger("change")});
class.yith-wcmg.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Main class
4
+ *
5
+ * @author Your Inspiration Themes
6
+ * @package YITH WooCommerce Zoom Magnifier
7
+ * @version 1.1.2
8
+ */
9
+
10
+ if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
11
+
12
+ if( !class_exists( 'YITH_WCMG' ) ) {
13
+ /**
14
+ * WooCommerce Magnifier
15
+ *
16
+ * @since 1.0.0
17
+ */
18
+ class YITH_WCMG {
19
+
20
+
21
+ /**
22
+ * Plugin object
23
+ *
24
+ * @var string
25
+ * @since 1.0.0
26
+ */
27
+ public $obj = null;
28
+
29
+ /**
30
+ * Constructor
31
+ *
32
+ * @return mixed|YITH_WCMG_Admin|YITH_WCMG_Frontend
33
+ * @since 1.0.0
34
+ */
35
+ public function __construct() {
36
+
37
+ // actions
38
+ add_action( 'init', array( $this, 'init' ) );
39
+
40
+ if( is_admin() ) {
41
+ $this->obj = new YITH_WCMG_Admin( );
42
+ } else {
43
+ $this->obj = new YITH_WCMG_Frontend( );
44
+ }
45
+
46
+ return $this->obj;
47
+ }
48
+
49
+
50
+ /**
51
+ * Init method:
52
+ * - default options
53
+ *
54
+ * @access public
55
+ * @since 1.0.0
56
+ */
57
+ public function init() {
58
+ $this->_image_sizes();
59
+ }
60
+
61
+
62
+ /**
63
+ * Add image sizes
64
+ *
65
+ * Init images
66
+ *
67
+ * @access protected
68
+ * @return void
69
+ * @since 1.0.0
70
+ */
71
+ protected function _image_sizes() {
72
+ $size = get_option('woocommerce_magnifier_image');
73
+ $width = $size['width'];
74
+ $height = $size['height'];
75
+ $crop = isset( $size['crop'] ) ? true : false;
76
+
77
+ add_image_size( 'shop_magnifier', $width, $height, $crop );
78
+ }
79
+ }
80
+ }
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
6
- * Version: 1.2.27
7
  * Author: YITHEMES
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
@@ -11,7 +11,7 @@
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Magnifier
14
- * @version 1.2.27
15
  */
16
  /* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
@@ -76,7 +76,7 @@ if ( ! function_exists ( 'yith_plugin_registration_hook' ) ) {
76
  register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
77
 
78
  defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
79
- defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.2.27' );
80
  defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
81
  defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
82
  defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
6
+ * Version: 1.2.28
7
  * Author: YITHEMES
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Magnifier
14
+ * @version 1.2.28
15
  */
16
  /* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
76
  register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
77
 
78
  defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
79
+ defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.2.28' );
80
  defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
81
  defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
82
  defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 2.9.62
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 2.9.63
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
plugin-fw/yit-woocommerce-compatibility.php CHANGED
@@ -319,6 +319,7 @@ if ( !function_exists( 'yit_wc_deprecated_filters' ) ) {
319
  'woocommerce_product_weight' => 'woocommerce_product_get_weight',
320
  'woocommerce_get_sku' => 'woocommerce_product_get_sku',
321
  'woocommerce_get_price' => 'woocommerce_product_get_price',
 
322
  'woocommerce_get_regular_price' => 'woocommerce_product_get_regular_price',
323
  'woocommerce_get_sale_price' => 'woocommerce_product_get_sale_price',
324
  'woocommerce_product_tax_class' => 'woocommerce_product_get_tax_class',
319
  'woocommerce_product_weight' => 'woocommerce_product_get_weight',
320
  'woocommerce_get_sku' => 'woocommerce_product_get_sku',
321
  'woocommerce_get_price' => 'woocommerce_product_get_price',
322
+ 'woocommerce_get_price' => 'woocommerce_product_variation_get_price',
323
  'woocommerce_get_regular_price' => 'woocommerce_product_get_regular_price',
324
  'woocommerce_get_sale_price' => 'woocommerce_product_get_sale_price',
325
  'woocommerce_product_tax_class' => 'woocommerce_product_get_tax_class',