From 82ffd9894f69cdc2d209197076ef1aa1dc890bbc Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 29 Mar 2017 13:13:00 +0100 Subject: [PATCH] Filter empty tax values Fixes #13822 --- includes/class-wc-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 71373dc820c..11a618a25fa 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1372,7 +1372,7 @@ class WC_AJAX { $line_items[ $item_id ]['refund_total'] = wc_format_decimal( $total ); } foreach ( $line_item_tax_totals as $item_id => $tax_totals ) { - $line_items[ $item_id ]['refund_tax'] = array_map( 'wc_format_decimal', $tax_totals ); + $line_items[ $item_id ]['refund_tax'] = array_filter( array_map( 'wc_format_decimal', $tax_totals ) ); } // Create the refund object.