This commit is contained in:
pierrebuet 2017-03-24 12:13:00 +00:00 committed by Mike Jolley
parent 3683950cca
commit 32f8142c91
1 changed files with 5 additions and 1 deletions

View File

@ -121,7 +121,11 @@ $thumbnail = $product ? apply_filters( 'woocommerce_admin_order_item_thumbnai
}
if ( $item->get_subtotal() !== $item->get_total() ) {
echo '<span class="wc-order-item-discount">-' . wc_price( wc_round_tax_total( $tax_item_subtotal - $tax_item_total ), array( 'currency' => $order->get_currency() ) ) . '</span>';
if ( '' === $tax_item_total ) {
echo '<span class="wc-order-item-discount">&ndash;</span>';
} else {
echo '<span class="wc-order-item-discount">-' . wc_price( wc_round_tax_total( $tax_item_subtotal - $tax_item_total ), array( 'currency' => $order->get_currency() ) ) . '</span>';
}
}
if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id ) ) {