Version Description
- Support WooCommerce 3.0
Download this release
Release Info
Developer | themealien |
Plugin | Variation Swatches for WooCommerce |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- includes/class-admin.php +1 -1
- includes/class-frontend.php +1 -1
- readme.txt +5 -2
- variation-swatches-for-woocommerce.php +2 -2
includes/class-admin.php
CHANGED
@@ -201,7 +201,7 @@ class TA_WC_Variation_Swatches_Admin {
|
|
201 |
$all_terms = get_terms( $taxonomy_name, apply_filters( 'woocommerce_product_attribute_terms', array( 'orderby' => 'name', 'hide_empty' => false ) ) );
|
202 |
if ( $all_terms ) {
|
203 |
foreach ( $all_terms as $term ) {
|
204 |
-
echo '<option value="' . esc_attr( $term->
|
205 |
}
|
206 |
}
|
207 |
?>
|
201 |
$all_terms = get_terms( $taxonomy_name, apply_filters( 'woocommerce_product_attribute_terms', array( 'orderby' => 'name', 'hide_empty' => false ) ) );
|
202 |
if ( $all_terms ) {
|
203 |
foreach ( $all_terms as $term ) {
|
204 |
+
echo '<option value="' . esc_attr( $term->term_id ) . '" ' . selected( has_term( absint( $term->term_id ), $taxonomy_name, $thepostid ), true, false ) . '>' . esc_attr( apply_filters( 'woocommerce_product_attribute_term_name', $term->name, $term ) ) . '</option>';
|
205 |
}
|
206 |
}
|
207 |
?>
|
includes/class-frontend.php
CHANGED
@@ -77,7 +77,7 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
77 |
if ( array_key_exists( $attr->attribute_type, $swatch_types ) ) {
|
78 |
if ( ! empty( $options ) && $product && taxonomy_exists( $attribute ) ) {
|
79 |
// Get terms if this is a taxonomy - ordered. We need the names too.
|
80 |
-
$terms = wc_get_product_terms( $product->
|
81 |
|
82 |
foreach ( $terms as $term ) {
|
83 |
if ( in_array( $term->slug, $options ) ) {
|
77 |
if ( array_key_exists( $attr->attribute_type, $swatch_types ) ) {
|
78 |
if ( ! empty( $options ) && $product && taxonomy_exists( $attribute ) ) {
|
79 |
// Get terms if this is a taxonomy - ordered. We need the names too.
|
80 |
+
$terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
|
81 |
|
82 |
foreach ( $terms as $term ) {
|
83 |
if ( in_array( $term->slug, $options ) ) {
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: themealien
|
3 |
Tags: woocommerce, product attribute, product color, product size, variation swatches, variable products
|
4 |
Requires at least: 4.5
|
5 |
-
Tested up to: 4.7.
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -76,6 +76,9 @@ Yes, it will work with any theme, but may require some styling to make it match
|
|
76 |
|
77 |
== Changelog ==
|
78 |
|
|
|
|
|
|
|
79 |
= 1.0.1 =
|
80 |
* Add "swatches-support" class to the variations form
|
81 |
|
2 |
Contributors: themealien
|
3 |
Tags: woocommerce, product attribute, product color, product size, variation swatches, variable products
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 4.7.3
|
6 |
+
Stable tag: 1.0.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
76 |
|
77 |
== Changelog ==
|
78 |
|
79 |
+
= 1.0.2 =
|
80 |
+
* Support WooCommerce 3.0
|
81 |
+
|
82 |
= 1.0.1 =
|
83 |
* Add "swatches-support" class to the variations form
|
84 |
|
variation-swatches-for-woocommerce.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: WooCommerce Variation Swatches
|
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 with users.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: ThemeAlien
|
8 |
* Author URI: http://themealien.com/
|
9 |
* Requires at least: 4.5
|
10 |
-
* Tested up to: 4.7.
|
11 |
* License: GPLv2 or later
|
12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
13 |
* Text Domain: tawvs
|
3 |
* Plugin Name: WooCommerce Variation Swatches
|
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 with users.
|
6 |
+
* Version: 1.0.2
|
7 |
* Author: ThemeAlien
|
8 |
* Author URI: http://themealien.com/
|
9 |
* Requires at least: 4.5
|
10 |
+
* Tested up to: 4.7.3
|
11 |
* License: GPLv2 or later
|
12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
13 |
* Text Domain: tawvs
|