Made the attribute value comparison strict.

This commit is contained in:
Peter Fabian 2019-10-02 16:05:44 +02:00
parent 7ea9fdec62
commit 4cfe22eef9
1 changed files with 1 additions and 1 deletions

View File

@ -1112,7 +1112,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
// Loop over the variation meta keys and values i.e. what is saved to the products. Note: $attribute_value is empty when 'any' is in use.
foreach ( $variation as $attribute_key => $attribute_value ) {
$match_any_value = empty( $attribute_value ) && 0 != $attribute_value;
$match_any_value = empty( $attribute_value ) && 0.0 !== floatval( $attribute_value );
if ( ! $match_any_value && ! array_key_exists( $attribute_key, $match_attributes ) ) {
$match = false; // Requires a selection but no value was provide.