Variation Swatches for WooCommerce - Version 1.0.7

Version Description

  • Tweak - Update CSS for active state of swatches, remove the box shadow.
  • Fix - Tooltip is not showed on image swatches.
Download this release

Release Info

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

Code changes from version 1.0.6 to 1.0.7

assets/css/frontend.css CHANGED
@@ -4,7 +4,6 @@
4
  }
5
 
6
  .tawcvs-swatches {
7
- /*overflow: hidden;*/
8
  padding: 5px;
9
  }
10
 
@@ -20,18 +19,16 @@
20
  display: inline-block;
21
  width: 30px;
22
  height: 30px;
23
- line-height: 30px;
24
  text-align: center;
25
  margin-right: 15px;
26
  cursor: pointer;
27
- border: 1px solid transparent;
28
  position: relative;
 
29
  }
30
 
31
  .tawcvs-swatches .swatch.selected {
32
- -webkit-box-shadow: 0 0 5px;
33
- -moz-box-shadow: 0 0 5px;
34
- box-shadow: 0 0 5px;
35
  border-color: #999;
36
  }
37
 
@@ -65,11 +62,22 @@
65
  }
66
 
67
  .tawcvs-swatches .swatch-label {
 
68
  background-color: #f1f1f1;
69
  }
70
 
71
  .tawcvs-swatches .swatch-image {
72
- overflow: hidden;
 
 
 
 
 
 
 
 
 
 
73
  }
74
 
75
  .tawcvs-swatches .swatch__tooltip {
4
  }
5
 
6
  .tawcvs-swatches {
 
7
  padding: 5px;
8
  }
9
 
19
  display: inline-block;
20
  width: 30px;
21
  height: 30px;
22
+ line-height: 28px;
23
  text-align: center;
24
  margin-right: 15px;
25
  cursor: pointer;
26
+ border: 2px solid transparent;
27
  position: relative;
28
+ white-space: nowrap;
29
  }
30
 
31
  .tawcvs-swatches .swatch.selected {
 
 
 
32
  border-color: #999;
33
  }
34
 
62
  }
63
 
64
  .tawcvs-swatches .swatch-label {
65
+ font-size: 14px;
66
  background-color: #f1f1f1;
67
  }
68
 
69
  .tawcvs-swatches .swatch-image {
70
+ font-size: 0;
71
+ }
72
+
73
+ .tawcvs-swatches .swatch-image img {
74
+ -webkit-border-radius: 50%;
75
+ -moz-border-radius: 50%;
76
+ border-radius: 50%;
77
+ }
78
+
79
+ .tawcvs-swatches .swatch-image .swatch__tooltip {
80
+ font-size: 14px;
81
  }
82
 
83
  .tawcvs-swatches .swatch__tooltip {
includes/class-frontend.php CHANGED
@@ -38,8 +38,8 @@ class TA_WC_Variation_Swatches_Frontend {
38
  * Enqueue scripts and stylesheets
39
  */
40
  public function enqueue_scripts() {
41
- wp_enqueue_style( 'tawcvs-frontend', plugins_url( 'assets/css/frontend.css', dirname( __FILE__ ) ), array(), '20200222' );
42
- wp_enqueue_script( 'tawcvs-frontend', plugins_url( 'assets/js/frontend.js', dirname( __FILE__ ) ), array( 'jquery' ), '20160615', true );
43
  }
44
 
45
  /**
@@ -114,7 +114,7 @@ class TA_WC_Variation_Swatches_Frontend {
114
  $name = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) );
115
  $tooltip = '';
116
 
117
- if ( $args['tooltip'] ) {
118
  $tooltip = '<span class="swatch__tooltip">' . ( $term->description ? $term->description : $name ) . '</span>';
119
  }
120
 
38
  * Enqueue scripts and stylesheets
39
  */
40
  public function enqueue_scripts() {
41
+ wp_enqueue_style( 'tawcvs-frontend', plugins_url( 'assets/css/frontend.css', TAWC_VS_PLUGIN_FILE ), array(), '20200222' );
42
+ wp_enqueue_script( 'tawcvs-frontend', plugins_url( 'assets/js/frontend.js', TAWC_VS_PLUGIN_FILE ), array( 'jquery' ), '20200317', true );
43
  }
44
 
45
  /**
114
  $name = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) );
115
  $tooltip = '';
116
 
117
+ if ( ! empty( $args['tooltip'] ) ) {
118
  $tooltip = '<span class="swatch__tooltip">' . ( $term->description ? $term->description : $name ) . '</span>';
119
  }
120
 
readme.txt CHANGED
@@ -2,8 +2,10 @@
2
  Contributors: themealien, coderexco
3
  Tags: woocommerce, product attribute, product color, product size, variation swatches, variable products
4
  Requires at least: 4.5
5
- Tested up to: 5.3
6
- Stable tag: 1.0.6
 
 
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -75,6 +77,10 @@ Yes, it will work with any theme, but may require some styling to make it match
75
 
76
  == Changelog ==
77
 
 
 
 
 
78
  = 1.0.6 =
79
  * New - Add a notice in admin area to restore attribute types after re-activating the plugin.
80
  * Tweak - Rename the tooltip CSS class following WooCommerce standard.
2
  Contributors: themealien, coderexco
3
  Tags: woocommerce, product attribute, product color, product size, variation swatches, variable products
4
  Requires at least: 4.5
5
+ Tested up to: 5.4
6
+ Stable tag: 1.0.7
7
+ WC requires at least: 3.2.0
8
+ WC tested up to: 4.0.0
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
77
 
78
  == Changelog ==
79
 
80
+ = 1.0.7 =
81
+ * Tweak - Update CSS for active state of swatches, remove the box shadow.
82
+ * Fix - Tooltip is not showed on image swatches.
83
+
84
  = 1.0.6 =
85
  * New - Add a notice in admin area to restore attribute types after re-activating the plugin.
86
  * Tweak - Rename the tooltip CSS class following WooCommerce standard.
variation-swatches-for-woocommerce.php CHANGED
@@ -3,18 +3,20 @@
3
  * Plugin Name: Variation Swatcher for WooCommerce
4
  * Plugin URI: http://themealien.com/wordpress-plugin/woocommerce-variation-swatches
5
  * Description: An extension of WooCommerce to make variable products be more beauty and friendly to users.
6
- * Version: 1.0.6
7
  * Author: ThemeAlien
8
  * Author URI: http://themealien.com/
9
  * Requires at least: 4.5
10
- * Tested up to: 5.3
11
- * License: GPLv2 or later
12
- * License URI: https://www.gnu.org/licenses/gpl-2.0.html
13
  * Text Domain: wcvs
14
- * Domain Path: /languages/
15
  * WC requires at least: 3.0.0
16
- * WC tested up to: 3.9.1
 
 
 
17
  */
 
18
  if ( ! defined( 'ABSPATH' ) ) {
19
  exit; // Exit if accessed directly.
20
  }
3
  * Plugin Name: Variation Swatcher for WooCommerce
4
  * Plugin URI: http://themealien.com/wordpress-plugin/woocommerce-variation-swatches
5
  * Description: An extension of WooCommerce to make variable products be more beauty and friendly to users.
6
+ * Version: 1.0.7
7
  * Author: ThemeAlien
8
  * Author URI: http://themealien.com/
9
  * Requires at least: 4.5
10
+ * Tested up to: 5.4
 
 
11
  * Text Domain: wcvs
12
+ * Domain Path: /languages
13
  * WC requires at least: 3.0.0
14
+ * WC tested up to: 4.0.0
15
+ *
16
+ * License: GPLv2 or later
17
+ * License URI: https://www.gnu.org/licenses/gpl-2.0.html
18
  */
19
+
20
  if ( ! defined( 'ABSPATH' ) ) {
21
  exit; // Exit if accessed directly.
22
  }