Filter empty tax values

Fixes #13822
This commit is contained in:
Mike Jolley 2017-03-29 13:13:00 +01:00
parent df13658dab
commit 82ffd9894f
1 changed files with 1 additions and 1 deletions

View File

@ -1372,7 +1372,7 @@ class WC_AJAX {
$line_items[ $item_id ]['refund_total'] = wc_format_decimal( $total ); $line_items[ $item_id ]['refund_total'] = wc_format_decimal( $total );
} }
foreach ( $line_item_tax_totals as $item_id => $tax_totals ) { 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. // Create the refund object.