Tax Switch for WooCommerce
Tax Switch for WooCommerce enhances your WooCommerce store by allowing users to toggle between displaying prices including or excluding VAT. This plugin adds a customizable switch component and provides a flexible way to display both price versions.
Key features
- Display customizable switches where you want
- Gutenberg block support
- Shortcode for easy integration (including shortcode generator)
- Flexible display options for prices with and without VAT
- Remembers the user’s preference for future visits
- Choose between a toggle switch or buttons
For more information about this plugin, please visit the plugin page.
Requirements
- WooCommerce plugin installed and activated
- WooCommerce tax calculations enabled and configured
Configuration
Configure the plugin settings below for proper functionality.
WooCommerce settings
Ensure these WooCommerce settings are configured first:
-
Configure tax calculations
- Go to: WooCommerce > Settings > General
- Verify your shop address is complete
- Enable “Enable tax rates and calculations”
- Set “Default customer location” to “Shop base address”
-
Set up tax rates
- Go to: WooCommerce > Settings > Tax > Standard Rates
- Add your regional tax rates
-
Recommended: tax calculation method
- Go to: WooCommerce > Settings > Tax
- Set “Calculate tax based on” to “Shop base address”
(This provides instant tax calculation. Other methods require customers to enter their address first.)
-
Individual product configuration
- Edit products at: Products > [Product]
- Under Product Data > Tax, set status to “Taxable”
Plugin settings
Configure these plugin-specific settings:
- Main settings
- Go to: WooCommerce > Settings > Tax Switch
- Set your preferred text values
- Optional: Restrict display locations
- Optional: Generate a shortcode via WooCommerce > Settings > Tax Switch > Shortcode
Usage
After installation and configuration, you can add the tax switch to your pages in two ways:
- Use the Gutenberg block “Tax Switch for WooCommerce” in your page or post editor.
- Use the shortcode
[wdevs_tax_switch]anywhere in your content.
Shortcode Usage
Switch/buttons
Basic usage:
[wdevs_tax_switch]
Displays a switch to toggle displaying prices including or excluding VAT.
The shortcode accepts several attributes to customize its appearance and behavior:
class-name: Adds custom CSS classes to the switch.- Default: is-style-default
- Options: is-style-default, is-style-inline, is-style-flat-pill, or custom classes
switch-type: Determines the style of the toggle.- Default:
switch - Options:
switch,buttons
- Default:
switch-color: Sets the color of the switch handle.switch-color-checked: Sets the color of the switch when it’s in the “on” position.switch-background-color: Sets the background color of the switch.switch-text-color: Sets the text color of the switch labels.switch-background-color-checked: Sets the background color of the switch when it’s in the “on” position.switch-label-incl: Sets the text for the “including VAT” label.- Default: Uses the text set in the plugin settings or “Incl. VAT” if not set.
switch-label-excl: Sets the text for the “excluding VAT” label.- Default: Uses the text set in the plugin settings or “Excl. VAT” if not set.
switch-aria-label: Sets the aria label of the switch.- Default: Uses the text set in the plugin settings or “Switch between prices including and excluding VAT” if not set.
Example with custom attributes:
[wdevs_tax_switch class-name="is-style-inline" switch-type="switch" switch-color="#ffffff" switch-color-checked="#000000" switch-background-color="#000000" switch-background-color-checked="#4CAF50" switch-text-color="#FF0000" switch-label-incl="Incl. tax" switch-label-excl="Excl. tax" switch-aria-label="Switch between prices including and excluding VAT"]
Label
Basic usage:
[wdevs_tax_switch_label]
Displays text indicating the currently selected tax setting. The text updates automatically when the tax switch is toggled.
The shortcode accepts several attributes to customize its appearance and behavior:
class-name: Adds custom CSS classes to the label.- Default: is-style-default
- Options: is-style-default or custom classes
label-text-incl: Sets the text to display when “including VAT” is selected.- Default: Uses the text set in the plugin settings or “Incl. VAT” if not set.
label-text-excl: Sets the text to display when “excluding VAT” is selected.- Default: Uses the text set in the plugin settings or “Excl. VAT” if not set.
label-text-color: Sets the “excluding VAT” text color.label-text-color-checked: Sets the “including VAT” text color.
Example with custom attributes:
[wdevs_tax_switch_label class-name="tax-indicator" label-text-incl="Prices include tax" label-text-excl="Prices exclude tax" label-text-color="#FF0000" label-text-color-checked="#4CAF50"]
PHP implementation
You can use these shortcodes with PHP with the do_shortcode() function:
JavaScript events
The switch fires a JavaScript event when the tax display is toggled. You can listen for this event to execute custom code when a user switches between inclusive and exclusive VAT display. This is useful for when you need to perform additional actions based on the tax display state.
document.addEventListener('wdevs-tax-switch-changed', function(event) {
console.log(event.detail);
// event.detail contains:
// - isSwitched: boolean - the raw switch state
// - displayIncludingVat: boolean - whether prices now display including VAT
});
If you are loading the switch dynamically (via AJAX), dispatch this event after rendering to initialize the component:
document.dispatchEvent( new CustomEvent('wdevs-tax-switch-appeared') );
WPML
To translate the option texts via WPML:
- Save your options first in: WooCommerce -> Settings -> Tax Switch
- Then translate the texts in: WPML -> String Translations and search for your option values in the domain ‘tax-switch-for-woocommerce’
Compatibility
This plugin integrates with WooCommerce’s standard filters and actions for price display and calculation. While most plugins and themes work out of the box, some third-party code use custom price building methods that require specific compatibility integrations.
The following themes have been tested and confirmed compatible:
- GeneratePress
- Blocksy
- Thrive
- Flatsome
- Kapee
- Entr
- Woodmart
- Hello Elementor
The following plugins have been tested and confirmed compatible:
- WooCommerce Product Table Lite (+ PRO)
- Tiered Pricing Table for WooCommerce (+ Premium)
- Measurement Price Calculator for WooCommerce
- Discount Rules for WooCommerce
- YITH WooCommerce Product Add-Ons (+ & Extra Options Premium)
- JetEngine Listing Grid (Elementor)
- Product Add-Ons for WooCommerce
- B2BKing – Ultimate WooCommerce Wholesale and B2B Solution (+ Premium)
- Advanced Product Fields Pro for WooCommerce
- WooCommerce Quantity Discounts, Rules & Swatches
- FacetWP
- Variation Swatches for WooCommerce (+ PRO)
- Variation Price Display Range for WooCommerce (+ PRO)
- WooCommerce Product Add-Ons Ultimate
- Advanced Woo Search (+ PRO)
- B2B Market
- FiboFilters
- Extra Product Options & Add-Ons for WooCommerce
- FiboSearch – Ajax Search for WooCommerce (+ Pro)
- YayMail – WooCommerce Email Customizer
- PDF Invoices & Packing Slips for WooCommerce
- WooCommerce Product Bundles
- LiteSpeed Cache
- Elementor Pro
- YITH WooCommerce Role Based Prices
- WooCommerce Dynamic Pricing and Discount Rules
- Price Based on Country for WooCommerce
- WP Grid Builder
If you encounter any compatibility issues with other plugins or themes, please let us know. Your feedback helps us improve the plugin and extend compatibility to more third-party solutions.
Incompatibility
After multiple attempts to create compatibility functions, reaching out to the plugin developers several times, and still finding no viable solution, the following plugins remain incompatible:
- Unlimited Elements for Elementor (+ Pro): AJAX pagination and filtering issues
- Barn2: WooCommerce Product Options
Additional Information
This plugin is fully open source. You can find the source code on GitHub
For more information and other WordPress plugins, visit Wijnberg Developments.
| Domain | Exposures | Headers | Last Checked |
|---|---|---|---|
| s*l*r*r*s*.co.uk | F | 2026-04-28 16:00:00 | |
| t*m*e*s*o*e*t*.co.uk | B | 2026-04-28 11:11:06 | |
| b*u*d*e*s*e.wpenginepowered.com | F | 2026-04-28 07:50:04 | |
| v*o*r*e*w*r*i*g*e*o*.nl (WP 6.9.4) | D | 2026-04-27 21:28:04 | |
| h*t*u*s*e*a*e*u.nl (WP 6.9) | F | 2026-04-27 10:45:26 | |
| c*m*e*s.com (WP 6.9.4) | F | 2026-04-25 18:57:47 | |
| t*d*t*m*e*.se (WP 6.9.4) | D | 2026-04-25 17:23:09 | |
| a*g*m*s*e*r*g*r*t*o*.com.au (WP 6.9.4) | C | 2026-04-25 17:10:38 | |
| f*a*g*t*n*e*.com | F | 2026-04-25 11:40:14 | |
| g*p*-*r*u*.com (WP 6.8.1) | F | 2026-04-25 08:48:36 | |
| u*t*n*o*d.com | F | 2026-04-25 06:34:09 | |
| p*o*f*a.no (WP 6.9.4) | F | 2026-04-25 01:08:55 | |
| u*i*n*i*t*c*.com (WP 6.9.4) | D | 2026-04-23 20:43:57 | |
| k*l*.se (WP 6.9.4) | F | 2026-04-23 12:01:09 | |
| f*t*a*d*.de (WP 6.9.4) | D | 2026-04-23 04:34:44 | |
| l*t*c*n*e*t.hu (WP 6.9.4) | F | 2026-04-23 02:58:43 | |
| e*u*a*e*o*r*u*u*e.com | F | 2026-04-22 16:15:53 | |
| k*i*k*e*o*i*s.nl | F | 2026-04-21 19:46:57 | |
| k*i*k*e*o*i*s.com | F | 2026-04-21 13:42:57 | |
| l*c*t*a*k.nl (WP 6.9.4) | D | 2026-04-20 04:02:50 | |
| r*d*f*t*a*d*.com (WP 6.9.4) | F | 2026-04-20 02:16:26 | |
| y*u*i*h.nl | F | 2026-04-19 10:35:04 | |
| s*r*o.fi | D | 2026-04-19 07:47:29 | |
| v*s*y*t*m*.com (WP 6.9.4) | F | 2026-04-18 19:37:38 | |
| h*n*a*t*4.com | F | 2026-04-16 10:49:43 | |
| v*x*i*r*d*r*a.se (WP 6.9.4) | D | 2026-04-14 07:29:21 | |
| v*l*e*f*r*s*r*e*u*p*e*t.eu (WP 6.9.4) | F | 2026-04-14 06:25:21 | |
| h*n*y*n*i*e.co.uk | D | 2026-04-14 04:35:01 | |
| d*p*i*s*a*g.nl | F | 2026-04-13 14:08:50 | |
| m*p*p*e*.nl | F | 2026-04-13 14:08:49 | |
| d*r*c*a*e*a*l*n.nl | F | 2026-04-13 14:08:49 | |
| a*a*t*r*f*o*c*e*e.com (WP 6.9) | F | 2026-04-13 10:10:10 | |
| e*r*e*e*t*i*a*s*p*l*e*.com (WP 6.9.4) | F | 2026-04-12 19:28:09 | |
| a*v*g*o*p.ua | F | 2026-04-12 18:27:58 | |
| e*o*t*a*i*g.com (WP 6.9.4) | F | 2026-04-12 11:18:32 | |
| t*d*o*o*.com (WP 6.8.3) | F | 2026-04-12 10:48:46 | |
| m*n*k*s.com (WP 6.9.4) | F | 2026-04-12 05:43:31 | |
| g*i*t*.com | D | 2026-04-11 13:21:26 | |
| t*p*e*s*e*t*n*.com | F | 2026-04-11 11:18:36 | |
| p*b*i*r*f*.pt (WP 6.9.4) | D | 2026-04-10 22:39:35 | |
| p*i*t*3.bg (WP 6.9.4) | D | 2026-04-10 19:29:04 | |
| b*u*d*e*s.me | F | 2026-04-10 08:52:32 | |
| d*v*i*s.com (WP 6.8.2) | F | 2026-04-10 05:46:28 | |
| p*n*o*r.net (WP 6.9.4) | F | 2026-04-10 03:13:54 | |
| s*l*i*g*a*d.dk (WP 6.9.4) | D | 2026-04-08 14:45:07 | |
| l*s*e*m*o*-*e*e*r*.com | F | 2026-04-06 09:18:05 | |
| v*r*a*.ai (WP 6.8.5) | — | 2026-03-26 16:12:52 | |
| r*f*x*n*s.com (WP 6.9.4) | — | 2026-03-14 00:59:36 | |
| m*k*r*t*c*2*.de | — | 2025-11-12 06:54:39 | |
| a*u*h*a*p*n.se | — | 2025-11-12 04:59:21 | |
| t*y*k*n*.no | — | 2025-11-12 04:20:44 | |
| f*r*r*r*k*l*.se | — | 2025-11-12 04:00:59 | |
| v*l*n*e*h.cz | — | 2025-11-12 03:48:14 | |
| v*s*e*l*f*b*i*e*.se | — | 2025-11-12 03:04:24 | |
| w*l*e*r*s*e*e*t*.com | — | 2025-11-11 13:30:00 | |
| s*o*w*z*.com | — | 2025-11-10 11:53:32 | |
| s*l*g*a*.com | — | 2025-11-10 11:38:51 | |
| s*r*d*c*.com | — | 2025-11-10 10:23:40 | |
| s*f*t*-*e*r*d*r*c*.com | — | 2025-11-10 06:54:14 | |
| p*i*t*s*m*.com | — | 2025-11-09 22:28:24 | |
| p*i*t*n*s*a*e.com | — | 2025-11-09 22:28:24 | |
| p*e*e*l*n*y.com | — | 2025-11-09 21:56:08 | |
| p*e*r*m*r*o*i.com | — | 2025-11-09 19:58:12 | |
| p*d*a*a*a*t*o*u*p*i*s.com | — | 2025-11-09 18:38:13 | |
| p*b*x*a*t*.com | — | 2025-11-09 18:35:48 | |
| m*p*r*s*i*t.com | — | 2025-11-09 07:49:54 | |
| m*s*r*b*t*c*.com | — | 2025-11-09 07:22:18 | |
| m*r*a*e*i*a*.com | — | 2025-11-09 07:16:39 | |
| j*s*r*i*o*u*i*n*.com | — | 2025-11-08 12:00:09 | |
| g*s*r*u*a*.com | — | 2025-11-07 20:07:49 | |
| g*r*n*r*p*r*s.com | — | 2025-11-07 20:00:55 | |
| f*x*t*b*e.com | — | 2025-11-07 18:04:31 | |
| e*l*t*i*e*a*h*o*l*c.com | — | 2025-11-07 10:46:37 | |
| e*e*t*i*s*a*e*.com | — | 2025-11-07 10:21:08 | |
| e*u*e*g*t*.com | — | 2025-11-07 09:19:07 | |
| d*c*u*.com | — | 2025-11-07 08:18:48 | |
| c*t*r*e*v*u*.com | — | 2025-11-06 18:27:50 | |
| b*l*a*i*a*k.com | — | 2025-11-06 10:13:40 |