empty checking

This commit is contained in:
Mike Jolley 2015-08-13 16:58:20 +01:00
parent 827ff2ae85
commit d9f9da955d
1 changed files with 1 additions and 1 deletions

View File

@ -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 ( $options['is_variation'] && ! array_key_exists( $attribute, $variation_attributes ) ) {
if ( ! empty( $options['is_variation'] ) && ! array_key_exists( $attribute, $variation_attributes ) ) {
$variation_attributes[ $attribute ] = ''; // Add it - 'any' will be asumed
}
}