Variation Swatches for WooCommerce - Version 2.1.5

Version Description

  • Minor bugs fix and improvements.
Download this release

Release Info

Developer themealien
Plugin Icon 128x128 Variation Swatches for WooCommerce
Version 2.1.5
Comparing to
See all releases

Code changes from version 2.1.4 to 2.1.5

includes/class-frontend.php CHANGED
@@ -269,7 +269,7 @@ class TA_WC_Variation_Swatches_Frontend {
269
  public function swatch_html( $html, $term, $type, $args ) {
270
 
271
  $selected = sanitize_title( $args['selected'] ) == $term->slug ? 'selected' : '';
272
- $name = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) );
273
 
274
  $tooltip = $this->get_tooltip_html( '', $term, $name, $args );
275
  $tooltip = apply_filters( 'tawcvs_tooltip_html', $tooltip, $term, $name, $args );
269
  public function swatch_html( $html, $term, $type, $args ) {
270
 
271
  $selected = sanitize_title( $args['selected'] ) == $term->slug ? 'selected' : '';
272
+ $name = esc_html( apply_filters( 'woocommerce_variation_option_name', ! empty( $term->description ) ? $term->description : $term->name ) );
273
 
274
  $tooltip = $this->get_tooltip_html( '', $term, $name, $args );
275
  $tooltip = apply_filters( 'tawcvs_tooltip_html', $tooltip, $term, $name, $args );
includes/class-menu-page.php CHANGED
@@ -9,7 +9,9 @@ class VSWC_Settings_Page {
9
  private $upgrader_obj;
10
 
11
  public function __construct() {
12
- $this->upgrader_obj = new VSWC_Upgrader();
 
 
13
 
14
  add_action( 'admin_menu', array( $this, 'handle_save_actions' ), 5 );
15
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
@@ -68,7 +70,7 @@ class VSWC_Settings_Page {
68
  public function render() {
69
  TA_WC_Variation_Swatches::get_template( 'admin/setting-panel.php' );
70
  TA_WC_Variation_Swatches::get_template( 'admin/pro-feature-popup.php' );
71
- if ( $this->upgrader_obj->is_welcome_popup_should_be_shown() ) {
72
  TA_WC_Variation_Swatches::get_template( 'admin/welcome-popup.php' );
73
  }
74
  }
9
  private $upgrader_obj;
10
 
11
  public function __construct() {
12
+ if ( class_exists( 'VSWC_Upgrader' ) ) {
13
+ $this->upgrader_obj = new VSWC_Upgrader();
14
+ }
15
 
16
  add_action( 'admin_menu', array( $this, 'handle_save_actions' ), 5 );
17
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
70
  public function render() {
71
  TA_WC_Variation_Swatches::get_template( 'admin/setting-panel.php' );
72
  TA_WC_Variation_Swatches::get_template( 'admin/pro-feature-popup.php' );
73
+ if ( $this->upgrader_obj instanceof VSWC_Upgrader && $this->upgrader_obj->is_welcome_popup_should_be_shown() ) {
74
  TA_WC_Variation_Swatches::get_template( 'admin/welcome-popup.php' );
75
  }
76
  }
includes/class-variation-swatches.php CHANGED
@@ -231,6 +231,9 @@ final class TA_WC_Variation_Swatches {
231
 
232
  if ( ! empty( $variations ) ) {
233
  foreach ( $variations as $variation ) {
 
 
 
234
  $attribute_item_obj_slug = $variation['attributes'][ 'attribute_' . $attribute_tax_name ];
235
 
236
  if ( ! isset( $collected_variations[ $attribute_item_obj_slug ] ) ) {
231
 
232
  if ( ! empty( $variations ) ) {
233
  foreach ( $variations as $variation ) {
234
+ if ( ! isset( $variation['attributes'][ 'attribute_' . $attribute_tax_name ] ) ) {
235
+ continue;
236
+ }
237
  $attribute_item_obj_slug = $variation['attributes'][ 'attribute_' . $attribute_tax_name ];
238
 
239
  if ( ! isset( $collected_variations[ $attribute_item_obj_slug ] ) ) {
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
  Contributors: variationswatches, themealien, zgani, mehbubrashid, minhnguyen25
3
  Tags: variation swatches, woocommerce, product attribute, product color, product size, variable products
4
  Requires at least: 4.5
5
- Tested up to: 5.9
6
- Stable tag: 2.1.4
7
  WC requires at least: 3.2.0
8
- WC tested up to: 6.1.1
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -103,6 +103,9 @@ Yes, it will work with any theme, but may require some styling to make it match
103
  7. Add new attribute color when edit a product
104
 
105
  == Changelog ==
 
 
 
106
  = 2.1.4 =
107
  * Replace wp.ajax by normal ajax call, fix media upload
108
  * Removing unused function, reformat code
2
  Contributors: variationswatches, themealien, zgani, mehbubrashid, minhnguyen25
3
  Tags: variation swatches, woocommerce, product attribute, product color, product size, variable products
4
  Requires at least: 4.5
5
+ Tested up to: 5.9.2
6
+ Stable tag: 2.1.5
7
  WC requires at least: 3.2.0
8
+ WC tested up to: 6.3.1
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
103
  7. Add new attribute color when edit a product
104
 
105
  == Changelog ==
106
+ = 2.1.5 =
107
+ * Minor bugs fix and improvements.
108
+
109
  = 2.1.4 =
110
  * Replace wp.ajax by normal ajax call, fix media upload
111
  * Removing unused function, reformat code
templates/admin/welcome-popup.php CHANGED
@@ -6,10 +6,10 @@
6
  </div>
7
  <div class="popup-content">
8
  <div class="popup-inner-content">
9
- <p><strong>Congratulations on updating to v2.1.4!</strong></p>
10
- <p>TThank you to every that reported the swatches setting wasn't saving. We’ve been hard at work to make this update even better for you…</p>
11
- <p>Based on your feedback, we have added a bunch of new features and enhancements with a lot more to come.</p>
12
- <p><a href="https://woosuite.com/news/variation-swatches-updates/" target="_blank" rel="noopener noreferrer nofollow"> Click here to learn more. </a></p>
13
  <p>If you experience any issues, please get in touch with support so we can make it right: <a href="https://woosuite.com/support/" target="_blank" rel="noopener noreferrer nofollow">Support</a></p>
14
  </div>
15
  </div>
6
  </div>
7
  <div class="popup-content">
8
  <div class="popup-inner-content">
9
+ <p><strong>Variation Swatches 2.1.5 is here! 🥳🥳</strong></p>
10
+ <p>A few users reported having aax errors after updating so this version fixes that. We add back support for custom tooltips via description field.</p>
11
+ <p>This was based on your feedback, we have added a bunch of new features and enhancements with a lot more to go.</p>
12
+ <p><a href="https://woosuite.com/news/variation-swatches-v2-1-0-update/" target="_blank" rel="noopener noreferrer nofollow"> Click here to learn more. </a></p>
13
  <p>If you experience any issues, please get in touch with support so we can make it right: <a href="https://woosuite.com/support/" target="_blank" rel="noopener noreferrer nofollow">Support</a></p>
14
  </div>
15
  </div>
variation-swatches-for-woocommerce.php CHANGED
@@ -3,15 +3,15 @@
3
  * Plugin Name: Variation Swatches for WooCommerce
4
  * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
5
  * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
6
- * Version: 2.1.4
7
  * Author: Woosuite
8
  * Author URI: https://woosuite.com/
9
  * Requires at least: 4.5
10
- * Tested up to: 5.9
11
  * Text Domain: wcvs
12
  * Domain Path: /languages
13
  * WC requires at least: 3.0.0
14
- * WC tested up to: 6.1.1
15
  *
16
  * License: GPLv2 or later
17
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -27,7 +27,7 @@ if ( ! defined( 'TAWC_VS_PLUGIN_FILE' ) ) {
27
  }
28
 
29
  if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
30
- define( 'WCVS_PLUGIN_VERSION', '2.1.4' );
31
  }
32
 
33
  if ( ! defined( 'WCVS_PLUGIN_URL' ) ) {
3
  * Plugin Name: Variation Swatches for WooCommerce
4
  * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
5
  * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
6
+ * Version: 2.1.5
7
  * Author: Woosuite
8
  * Author URI: https://woosuite.com/
9
  * Requires at least: 4.5
10
+ * Tested up to: 5.9.2
11
  * Text Domain: wcvs
12
  * Domain Path: /languages
13
  * WC requires at least: 3.0.0
14
+ * WC tested up to: 6.3.1
15
  *
16
  * License: GPLv2 or later
17
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
27
  }
28
 
29
  if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
30
+ define( 'WCVS_PLUGIN_VERSION', '2.1.5' );
31
  }
32
 
33
  if ( ! defined( 'WCVS_PLUGIN_URL' ) ) {