Add parenthesis
This commit is contained in:
parent
193540d7e7
commit
730e00565d
|
@ -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' ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue