|
/ Documentation /Modern Cart/ How to Show Taxes / Tax-Inclusive Prices in the Cart

How to Show Taxes / Tax-Inclusive Prices in the Cart

Modern Cart supports displaying tax information inside the cart tray, including itemized taxes and tax-inclusive pricing. The behavior follows your WooCommerce tax settings. Whether you can toggle the tax row on or off depends on whether you’re using Modern Cart Free or Pro. 

Free vs Pro Behavior

In Modern Cart Pro, there’s a “Show Tax” toggle under WooCommerce > Modern Cart > General tab. You can turn it on or off directly from settings, no code needed.

In Modern Cart Free, there’s no such toggle. The tax row is always shown by Default.

Enabling Tax Display (Pro)

  1. Go to WooCommerce> Modern Cart > Settings > General
  2. Find the “Show Tax” toggle
  3. Enable it
  4. Save your changes
show tax toggle settings

Configuring Tax Display in WooCommerce

Modern Cart inherits tax display settings from WooCommerce.

  1. Go to WooCommerce > Settings > Tax
  2. Under “Tax options,” set “Display prices during cart and checkout” to “Including tax” or “Excluding tax.” This is the setting that controls Modern Cart’s cart tray specifically (the separate “Display prices in the shop” setting only affects product and shop pages, not the cart).
  3. In the same “Tax options” section, set “Display tax totals” to “As a single total” or “Itemized.”
  4. Save changes
woocommerce tax settings

Here is the Doc on Setting up Taxes in WooCommerce.

Tax-Inclusive Pricing

When WooCommerce is set to display prices including tax, Modern Cart adds a note next to the cart total showing the actual tax amount and label, for example “(includes $5.00 VAT).” This is calculated automatically and is not shown as a percentage. 

modern cart tax based prices

Customizing Tax Display (Developer)

Use these filters to customize tax output:

// Customize the tax HTML output
add_filter( 'moderncart_cart_totals_vat_total_html', function( $html ) {
    return '<span class="my-tax-row">' . $html . '</span>';
});

Refer to this documentation to know how to add custom code to website: How and Where to Add Custom JS, CSS, and PHP Codes

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents