wc_get_product_variation_attributes should only get parent attributes which are for variations.
Closes #8796
This commit is contained in:
parent
817f8476ac
commit
cbb89fa4b9
|
@ -632,7 +632,7 @@ function wc_get_product_variation_attributes( $variation_id ) {
|
|||
foreach ( $parent_attributes as $attribute_name => $options ) {
|
||||
$attribute = 'attribute_' . sanitize_title( $attribute_name );
|
||||
$found_parent_attributes[] = $attribute;
|
||||
if ( ! array_key_exists( $attribute, $variation_attributes ) ) {
|
||||
if ( $options['is_variation'] && ! array_key_exists( $attribute, $variation_attributes ) ) {
|
||||
$variation_attributes[ $attribute ] = ''; // Add it - 'any' will be asumed
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,6 +165,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Fix - Ajax variations: stripslashes to fix attributes with quotes.
|
||||
* Fix - No longer returns to the first variation list page when deleting one variation.
|
||||
* Fix - Refund subjects when order contains downloadable product.
|
||||
* Fix - wc_get_product_variation_attributes should only get parent attributes which are for variations.
|
||||
* Tweak - Disable display_errors during ajax requests to prevent malformed JSON.
|
||||
* Tweak - When merging shipping taxes with a shipping rate taxes, ensure shipping rate taxes is not malformed.
|
||||
|
||||
|
|
Loading…
Reference in New Issue