Fix null check introduced by phpcs changes

This commit is contained in:
Mike Jolley 2018-03-13 11:57:51 +00:00
parent 1dd558ac69
commit a5a6d02f86
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ class WC_Product_Variable_Data_Store_CPT extends WC_Product_Data_Store_CPT imple
);
// Empty value indicates that all options for given attribute are available.
if ( in_array( '', $values, true ) || empty( $values ) ) {
if ( in_array( null, $values, true ) || in_array( '', $values, true ) || empty( $values ) ) {
$values = $attribute['is_taxonomy'] ? wc_get_object_terms( $product->get_id(), $attribute['name'], 'slug' ) : wc_get_text_attributes( $attribute['value'] );
// Get custom attributes (non taxonomy) as defined.
} elseif ( ! $attribute['is_taxonomy'] ) {