From e7a575222af9c36f991e9306d0f2e0e7f250f873 Mon Sep 17 00:00:00 2001 From: TimBHowe Date: Fri, 20 Dec 2019 18:46:49 -0500 Subject: [PATCH] Updated if statment to allow 0 values --- includes/shipping/flat-rate/class-wc-shipping-flat-rate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php index 82f06426690..c09513e8664 100644 --- a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php +++ b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php @@ -264,7 +264,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method { $value = wp_kses_post( trim( wp_unslash( $value ) ) ); $value = str_replace( array( get_woocommerce_currency_symbol(), html_entity_decode( get_woocommerce_currency_symbol() ) ), '', $value ); // Thrown an error on the front end if the evaluate_cost will fail. - if ( ! $this->evaluate_cost( $value ) ) { + if ( false === $this->evaluate_cost( $value ) ) { throw new Exception( WC_Eval_Math::$last_error ); } return $value;