Add parenthesis

This commit is contained in:
Filipe Correa 2020-08-10 18:04:42 -03:00
parent 193540d7e7
commit 730e00565d
1 changed files with 1 additions and 1 deletions

View File

@ -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' ) );
}