Updated if statment to allow 0 values

This commit is contained in:
TimBHowe 2019-12-20 18:46:49 -05:00
parent d377f002aa
commit e7a575222a
1 changed files with 1 additions and 1 deletions

View File

@ -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;