Version Description
- Fix - Sometimes can't select attributes.
Download this release
Release Info
Developer | themealien |
Plugin | Variation Swatches for WooCommerce |
Version | 1.0.9 |
Comparing to | |
See all releases |
Code changes from version 1.0.8 to 1.0.9
- assets/js/frontend.js +19 -17
- readme.txt +4 -1
- variation-swatches-for-woocommerce.php +1 -1
assets/js/frontend.js
CHANGED
@@ -47,27 +47,29 @@
|
|
47 |
$form.find( '.swatch.disabled' ).removeClass( 'disabled' );
|
48 |
} )
|
49 |
.on( 'woocommerce_update_variation_values', function() {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
69 |
} );
|
70 |
-
} );
|
71 |
} )
|
72 |
.on( 'tawcvs_no_matching_variations', function() {
|
73 |
window.alert( wc_add_to_cart_variation_params.i18n_no_matching_variations_text );
|
47 |
$form.find( '.swatch.disabled' ).removeClass( 'disabled' );
|
48 |
} )
|
49 |
.on( 'woocommerce_update_variation_values', function() {
|
50 |
+
setTimeout( function() {
|
51 |
+
$form.find( 'tbody tr' ).each( function() {
|
52 |
+
var $variationRow = $( this ),
|
53 |
+
options = $variationRow.find( 'select' ).find( 'option' ),
|
54 |
+
values = [];
|
55 |
|
56 |
+
options.each( function( index, option ) {
|
57 |
+
if ( option.value !== '' ) {
|
58 |
+
values.push( option.value );
|
59 |
+
}
|
60 |
+
} );
|
61 |
|
62 |
+
$variationRow.find( '.swatch' ).each( function() {
|
63 |
+
var $swatch = $( this );
|
64 |
|
65 |
+
if ( values.indexOf( $swatch.data( 'value' ) ) > -1 ) {
|
66 |
+
$swatch.removeClass( 'disabled' );
|
67 |
+
} else {
|
68 |
+
$swatch.addClass( 'disabled' );
|
69 |
+
}
|
70 |
+
} );
|
71 |
} );
|
72 |
+
}, 100 );
|
73 |
} )
|
74 |
.on( 'tawcvs_no_matching_variations', function() {
|
75 |
window.alert( wc_add_to_cart_variation_params.i18n_no_matching_variations_text );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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.1
|
6 |
-
Stable tag: 1.0.
|
7 |
WC requires at least: 3.2.0
|
8 |
WC tested up to: 4.1.0
|
9 |
License: GPLv2 or later
|
@@ -77,6 +77,9 @@ Yes, it will work with any theme, but may require some styling to make it match
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
80 |
= 1.0.8 =
|
81 |
* Enhancement - Disable invalid swatches base on select ones.
|
82 |
* Fix - Can't deactivate plugin without WooCommerce installed.
|
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.1
|
6 |
+
Stable tag: 1.0.9
|
7 |
WC requires at least: 3.2.0
|
8 |
WC tested up to: 4.1.0
|
9 |
License: GPLv2 or later
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 1.0.9 =
|
81 |
+
* Fix - Sometimes can't select attributes.
|
82 |
+
|
83 |
= 1.0.8 =
|
84 |
* Enhancement - Disable invalid swatches base on select ones.
|
85 |
* Fix - Can't deactivate plugin without WooCommerce installed.
|
variation-swatches-for-woocommerce.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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 |
* Author: ThemeAlien
|
8 |
* Author URI: http://themealien.com/
|
9 |
* Requires at least: 4.5
|
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.9
|
7 |
* Author: ThemeAlien
|
8 |
* Author URI: http://themealien.com/
|
9 |
* Requires at least: 4.5
|