Pass max_refund through wc_format_decimal

This commit is contained in:
Gerhard 2015-03-02 11:54:43 +02:00
parent c4e1602406
commit 368bfd97d1
1 changed files with 1 additions and 1 deletions

View File

@ -1864,7 +1864,7 @@ class WC_AJAX {
// Validate that the refund can occur
$order = wc_get_order( $order_id );
$order_items = $order->get_items();
$max_refund = $order->get_total() - $order->get_total_refunded();
$max_refund = wc_format_decimal( $order->get_total() - $order->get_total_refunded() );
if ( ! $refund_amount || $max_refund < $refund_amount ) {
throw new exception( __( 'Invalid refund amount', 'woocommerce' ) );