YITH WooCommerce Zoom Magnifier - Version 1.2.30

Version Description

Download this release

Release Info

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

Code changes from version 1.2.29 to 1.2.30

README.txt CHANGED
@@ -3,8 +3,8 @@
3
  Contributors: yithemes
4
  Tags: zoom, magnifier, slider, carousel, woocommerce
5
  Requires at least: 3.5.1
6
- Tested up to: 4.7.4
7
- Stable tag: 1.2.29
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -51,6 +51,12 @@ YITH WooCommerce Zoom Magnifier will add a new tab called "Zoom Magnifier" in "Y
51
 
52
  == Changelog ==
53
 
 
 
 
 
 
 
54
  = Version 1.2.29 - Released: Apr 30, 2017 =
55
 
56
  * Update: YITH Plugin Framework.
3
  Contributors: yithemes
4
  Tags: zoom, magnifier, slider, carousel, woocommerce
5
  Requires at least: 3.5.1
6
+ Tested up to: 4.8.1
7
+ Stable tag: 1.2.30
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.30 - Released: Aug 11, 2017 =
55
+
56
+ * New: support for WooCommerce 3.1.
57
+ * New: tested up to WordPress 4.8.
58
+ * Update: YITH Plugin Framework.
59
+
60
  = Version 1.2.29 - Released: Apr 30, 2017 =
61
 
62
  * Update: YITH Plugin Framework.
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.29
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.29
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.29' );
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.30
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.30
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.30' );
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__ ) );
lib/class.yith-ywzm-plugin-fw-loader.php CHANGED
@@ -282,7 +282,8 @@ if ( ! class_exists( 'YITH_YWZM_Plugin_FW_Loader' ) ) {
282
  */
283
  public function register_plugin_for_activation() {
284
  if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
285
- require_once 'plugin-fw/lib/yit-plugin-licence.php';
 
286
  }
287
  YIT_Plugin_Licence()->register( YITH_YWZM_INIT, YITH_YWZM_SECRET_KEY, YITH_YWZM_SLUG );
288
  }
282
  */
283
  public function register_plugin_for_activation() {
284
  if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
285
+ require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-licence.php';
286
+ require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-plugin-licence.php';
287
  }
288
  YIT_Plugin_Licence()->register( YITH_YWZM_INIT, YITH_YWZM_SECRET_KEY, YITH_YWZM_SLUG );
289
  }
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 2.9.65
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.68
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
plugin-fw/lib/yit-plugin-panel-wc.php CHANGED
@@ -64,6 +64,8 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
64
  'image_width'
65
  );
66
 
 
 
67
  if ( ! empty( $args ) ) {
68
  $this->settings = $args;
69
  $this->_tabs_path_files = $this->get_tabs_path_files();
64
  'image_width'
65
  );
66
 
67
+ $args = apply_filters( 'yit_plugin_fw_wc_panel_option_args', $args );
68
+
69
  if ( ! empty( $args ) ) {
70
  $this->settings = $args;
71
  $this->_tabs_path_files = $this->get_tabs_path_files();
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -77,7 +77,9 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
77
  'position' => null
78
  );
79
 
80
- $this->settings = wp_parse_args( $args, $default_args );
 
 
81
  $this->_tabs_path_files = $this->get_tabs_path_files();
82
 
83
  if ( isset( $this->settings['create_menu_page'] ) && $this->settings['create_menu_page'] ) {
77
  'position' => null
78
  );
79
 
80
+ $args = apply_filters( 'yit_plugin_fw_panel_option_args', wp_parse_args( $args, $default_args ) );
81
+
82
+ $this->settings = $args;
83
  $this->_tabs_path_files = $this->get_tabs_path_files();
84
 
85
  if ( isset( $this->settings['create_menu_page'] ) && $this->settings['create_menu_page'] ) {
plugin-fw/yit-woocommerce-compatibility.php CHANGED
@@ -570,6 +570,44 @@ if ( !function_exists( 'yit_get_refund_amount' ) ) {
570
  }
571
  }
572
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
573
  if ( !function_exists( 'yit_add_select2_fields' ) ) {
574
  /**
575
  * Add select 2
@@ -664,7 +702,9 @@ if ( !function_exists( 'yit_product_visibility_meta' ) ) {
664
  if ( version_compare( WC()->version, '2.7.0', '<' ) ) {
665
  $args[ 'meta_query' ] = isset( $args[ 'meta_query' ] ) ? $args[ 'meta_query' ] : array();
666
  $args[ 'meta_query' ][] = WC()->query->visibility_meta_query();
667
- } else {
 
 
668
  $product_visibility_term_ids = wc_get_product_visibility_term_ids();
669
  $args[ 'tax_query' ] = isset( $args[ 'tax_query' ] ) ? $args[ 'tax_query' ] : array();
670
  $args[ 'tax_query' ][] = array(
570
  }
571
  }
572
 
573
+ if ( !function_exists( 'yit_set_refund_amount' ) ){
574
+ /**
575
+ * @param $refund \WC_Order_Refund
576
+ * @param $amount float
577
+ *
578
+ * @return float
579
+ */
580
+ function yit_set_refund_amount( $refund, $amount ){
581
+ $is_wc_data = $refund instanceof WC_Data;
582
+
583
+ if( $is_wc_data ){
584
+ $refund->set_amount( $amount );
585
+ }
586
+ else{
587
+ $refund->refund_amount = $amount;
588
+ }
589
+ }
590
+ }
591
+
592
+ if ( !function_exists( 'yit_get_refund_reason' ) ){
593
+ /**
594
+ * @param $refund \WC_Order_Refund
595
+ * @param $amount float
596
+ *
597
+ * @return float
598
+ */
599
+ function yit_get_refund_reason( $refund ){
600
+ $is_wc_data = $refund instanceof WC_Data;
601
+
602
+ if( $is_wc_data ){
603
+ return $refund->get_reason();
604
+ }
605
+ else{
606
+ return $refund->get_refund_reason();
607
+ }
608
+ }
609
+ }
610
+
611
  if ( !function_exists( 'yit_add_select2_fields' ) ) {
612
  /**
613
  * Add select 2
702
  if ( version_compare( WC()->version, '2.7.0', '<' ) ) {
703
  $args[ 'meta_query' ] = isset( $args[ 'meta_query' ] ) ? $args[ 'meta_query' ] : array();
704
  $args[ 'meta_query' ][] = WC()->query->visibility_meta_query();
705
+ }
706
+
707
+ elseif( taxonomy_exists( 'product_visibility' ) ) {
708
  $product_visibility_term_ids = wc_get_product_visibility_term_ids();
709
  $args[ 'tax_query' ] = isset( $args[ 'tax_query' ] ) ? $args[ 'tax_query' ] : array();
710
  $args[ 'tax_query' ][] = array(