From a5a6d02f86bac4ad025e9b79d781f23516389b3f Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 13 Mar 2018 11:57:51 +0000 Subject: [PATCH] Fix null check introduced by phpcs changes --- .../data-stores/class-wc-product-variable-data-store-cpt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/data-stores/class-wc-product-variable-data-store-cpt.php b/includes/data-stores/class-wc-product-variable-data-store-cpt.php index 5f3ddf0ecca8e..1efa9eb1f2d97 100644 --- a/includes/data-stores/class-wc-product-variable-data-store-cpt.php +++ b/includes/data-stores/class-wc-product-variable-data-store-cpt.php @@ -197,7 +197,7 @@ protected function read_variation_attributes( &$product ) { ); // 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'] ) {