Use this filter when tax-inclusive catalog prices should not be adjusted by removing the store’s base tax and applying the customer’s location tax. The tax portion can still change with the applicable rate.
Note:
This is a Developer level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customizations. We are unable to provide support for customizations under our Support Policy.
This documentation covers how to set up tax rates in WooCommerce, as well as how the platform handles taxes/VAT/GST based on these settings — not when or what to charge.
We are not tax professionals; our advice only applies to how to use our software. For advice on what — or when — to charge tax/VAT/GST etc., we recommend consulting a tax professional or accountant.
Every business is unique, and we are unable to cover all possibilities here.
Before you start
↑ Back to topEnter prices inclusive of tax, configure the applicable location rates, and display prices inclusive of tax. Verify the intended pricing policy with a tax adviser. This filter affects WooCommerce price calculations store-wide; it does not set rates or exempt customers.
Test on a staging store first. Back up the store and add the snippet through a custom plugin or a snippet-management plugin. Keep a way to disable it if the site fails to load; avoid editing WooCommerce or a parent theme.
WooCommerce marks this price-adjustment behavior as experimental in its source. Recheck the result after upgrades, and remove the snippet if it conflicts with the store’s required pricing policy.
Add the snippet
↑ Back to top/**
* Keep tax-inclusive product prices across customer locations.
*
* @package WooCommerce\Docs
*/
add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' );
Verify the result
↑ Back to topTest the same taxable product and quantity with two customer addresses that use different rates. The tax-inclusive product price should stay the same while the tax portion changes. Check the product page, cart, checkout, and a test order. Tax-exempt customers, coupons, shipping, third-party pricing, and cached prices need separate checks.
Remove or troubleshoot the change
↑ Back to topDisable the snippet and repeat the same test to restore the default behavior. If the result differs, check the tax settings and conflicting customizations before changing the code. Clear relevant caches and test in separate customer sessions.