diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 07f15db6c0c..0769005367d 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1864,7 +1864,7 @@ class WC_AJAX { $order = wc_get_order( $order_id ); $max_refund = wc_format_decimal( $order->get_total() - $order->get_total_refunded(), wc_get_price_decimals() ); - if ( ( ! $refund_amount && $refund_amount !== wc_format_decimal(0, wc_get_price_decimals() ) ) || $max_refund < $refund_amount || 0 > $refund_amount ) { + if ( ( ! $refund_amount && $refund_amount !== wc_format_decimal( 0, wc_get_price_decimals() ) ) || $max_refund < $refund_amount || 0 > $refund_amount ) { throw new Exception( __( 'Invalid refund amount', 'woocommerce' ) ); }