Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit df12ee3

Browse files
authored
Hide tax row if totals are 0 (#4719)
1 parent d0fb8f8 commit df12ee3

File tree

1 file changed

+10
-9
lines changed
  • assets/js/blocks/cart-checkout/checkout-i2/inner-blocks/checkout-order-summary-block

1 file changed

+10
-9
lines changed

assets/js/blocks/cart-checkout/checkout-i2/inner-blocks/checkout-order-summary-block/block.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,16 @@ const Block = ( {
8888
/>
8989
</TotalsWrapper>
9090
) }
91-
{ ! getSetting( 'displayCartPricesIncludingTax', false ) && (
92-
<TotalsWrapper>
93-
<TotalsTaxes
94-
currency={ totalsCurrency }
95-
showRateAfterTaxName={ showRateAfterTaxName }
96-
values={ cartTotals }
97-
/>
98-
</TotalsWrapper>
99-
) }
91+
{ ! getSetting( 'displayCartPricesIncludingTax', false ) &&
92+
parseInt( cartTotals.total_tax, 10 ) > 0 && (
93+
<TotalsWrapper>
94+
<TotalsTaxes
95+
currency={ totalsCurrency }
96+
showRateAfterTaxName={ showRateAfterTaxName }
97+
values={ cartTotals }
98+
/>
99+
</TotalsWrapper>
100+
) }
100101
<TotalsWrapper>
101102
<TotalsFooterItem
102103
currency={ totalsCurrency }

0 commit comments

Comments
 (0)