raison supports this item


This author's response time can be up to 10 business days.

130 comments found.


On mobile the prices do not change when hitting the toggle button. The text changes from incl. to excl. and the otherway around but the prices stay the same. Would you take a look at this please? Kind regards, Daniel

Can you post the site url so I can see.


I want to use this plugin on a site with Polylang. Is it possible to translate the button in to the 3 languages that I use?


visits Purchased

Yes, but how do i manage the different translations? It seems that I can only use one language.

You have to use string translation – the same as with any other plugin. Not sure how Polylang manages this. Best to chat to them.

If you look in the root of the plugin I have added a file which gives an example of how to do translations manually. Hope that helps.


I have a problem whith this function. On the shop page the toggle works correct and shows the right prices but when you go to the single product page the price is incorrect. It looks like it shows the prive minis 2 times the taxe ratio.

Kind regards, Daniel

I cant replicate the issue on that link…

Why not? You can toggle the button right? and see that nothing happens? Is this a supportdesk or what?

Hi Maltha, Yes I’m happy to support you. I can see two things happening. The price sometimes doesn’t change. This indicates that the ex/incl tax rates are not set. Also I see on the product page that the price is not changing at all. This is because your theme is not outputting the price as per WooCommerce documentation. You can see there are some places the price is outputted correctly, such as the related products widget. Ask your theme developer to use the same method that is used there. For reference I’m looking at this page: https://partyverhuren.nl/product/multiplay-dolfijn/

Why doesnt the tax toggle on the cart page? It does toggle in the mini cart.

It looks like the plugin isnt complete yet? function cart_price_html( $product_price, $cart_item, $cart_item_key ) { global $woovat_text, $wc_incl, $wc_excl; if ( is_cart() ) { return $product_price; } else { return $product_price; $product = $cart_item['data']; $tax_value = wc_price( wc_get_price_including_tax( $product ) * 1 ); .............

You just return $product_price in both case. And the string looks like: <span class="woocommerce-Price-amount amount">395 <span class="woocommerce-Price-currencySymbol">kr</span></span> = just one price without the toggle part.

And then you have another function named min_cart_override() that overrides the prices in the mini cart from the cart_price_html() function. But you dont do the same for the cart on the cart page.

So that would be great else the user dont get that the price is presented with or without VAT.

Hi there – Fix made and will be emailed soon. I can see a new way to display tax totals has been added to WC. In the settings you can select tax to displayed in cart as itemised or total. Have made sure it works with both. Not sure about the cart_pirce_html query you made as think unrelated. The cart toggle is just adjusting the total section as that allows you to take advantage of the existing WC tax rules without affecting cart as much.

The cart_price_html is your function that doesnt add incl excl tax at all, but the else-statement is overwritten with another function. But good that you have fixed it! Looking forward for the new version. It keeps me from upgrading to 3.x as it is now.

The plugin isnt fully fixed to work with WC 3.x yet. It uses deprecated functions. I get a lot of warnings in my log file.

The WC_Product::get_price_including_tax function is deprecated since version 3.0. Replace with wc_get_price_including_tax.

This plugin works fine with WC 3.x – there were 2 functions using the recently depreciated but not removed function. These only display notices for debugging. I have now pushed an update which uses the replacement functions and this works fine. Thanks for letting me know.


extor Purchased

Hi, how do I change the colors and the hover on the button? Is it also possible that i can have 2 different texts? For example, B2C Shop and B2B Shop?


Hi Extor, Could you let me know how I can get it working for German regs? What’s the problem? I have a few german stores using the plugin already. Thanks for the help.


extor Purchased

Hi, of course, but i will not post it here in the comments.

Ok, feel free to send via my site raison.co

Hi, great plugin.

Just a few issues i regarding placement and look of tax toggle button.

I’m trying to use the shortcode [wootax] to place in text area of my header. However when placed, the button takes the full width of the container it is placed in. I’ve also placed it in the top menu and it pushes all the other elements out of view completey.

Can you advise on how I can adjust the button to be smaller. I’ve tried typical shortcode parameters but they don’t work.

You can see the button in its current form here: https://glana.wpstagecoach.com/

How can I then turn off the floating tax toggle widget at the side of each page?

Have sorted this issue myself. Have since left newer comment with fatal error issue

Hello – Ok, will ignore this and look at other item.

I have earlier messaged you about customizing size of tax toggle button. I have since figured it out using custom css but I now have a serious issue:

Fatal error: Cannot redeclare wctax_text_strings() (previously declared in /var/www/glana/staging-site/wp-content/plugins/woocommerce-tax/translate_example.php:10) in /var/www/glana/staging-site/wp-content/themes/basel/functions.php on line 197.

This error occured after I added the following code to change text strings: <?php

/** * Change text strings * * Add this code to your functions.php and then remove the // from the add_filter below to enable * * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext */ function wctax_text_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case ‘Excl.’ : $translated_text = __( ‘Excluding’, ‘wc-tax’ ); break; case ‘From’ : $translated_text = __( ‘Fromboli’, ‘wc-tax’ ); break; case ‘Incl.’ : $translated_text = __( ‘Including’, ‘wc-tax’ ); break; }

return $translated_text;

//add_filter( ‘gettext’, ‘wctax_text_strings’, 20, 3 );

I added this as a code snippet, initally and it has caused above fatal error. I have disabled plugin folder through FTP and did not fix error. I removed and re-installed tax toggle, no use either.

Can you please provide help as soon as possible!

Looks like you have added this function to your theme folder (/basel/functions.php on line 197) Have a look there.

I’ve renamed it, did not change issue. I’ve removed the function completely from my function.php file and the error still occurs. I’ve even removed the tax toggle plug in along with the translate_example.php which the error states was were the function was declared initially. The error seems almost hardcoded into the sight at this stage. Any other solutions?

Very strange. You must have added this to a part of the theme or (I hope not) to the core files. Does it happen when you change theme? If not, then it is in your theme. I’m afraid only you will know where that is. If you look at the logs or the error output that will tell you where the issue is. Good luck and this isn’t really a problem with our plugin but some code in the wrong place..

We set up the plugin, and almost everything seems to work good. We got it setup with the checkout and cart as well.

The problem is just, that when toggling between “private” and “business”, we are able to stress it. It is a “little problem”, because those people are not able to buy it for the price, that it shows wrong. The “mystical” part, is that we are able to “stress” it, so it shows a price, where the VAT is substracted twice – which makes it a pretty good deal for the customers. As said, they are not able to make it through checkout with this price, but in our country, we have some strict “marketing” laws, which makes it “not okay” to show a price and then afterwards not selling the product for the price, which is on the product.

How can we fix this?

Hello. Not sure what is meant between private and business – can you provide me a URL? Thanks

Ehm that is our to factors to switch between Including or excluding VAT URL: billigkoste.dk

Interesting. It looks like you have a cart and checkout page that uses a different setup to the recommended and standard WooCommerce cart and checkout. The plugin should have no effect on the checkout page because the tax rules are set by the WooCommerce plugin and implemented in the checkout. For example, if you have set a product as being no tax, then this is calculated and displayed in the checkout. All the plugin will do is to toggle in the shop to let the user compare the difference.

What is the behavior of this plugin if we’re using a cache plugin, like W3 Total Cache or WP Super cache? I’m guessing we must disable all server side caching if we want to let visitors choose to see the price with or without caching.

If a plugin caches a full page (including the prices HTML) how can we be sure that the toggle will be able to change the values WITHOUT disabling the full page cache? Have you tried it with any cache plugin?

Both prices are outputted onto the page. The toggle uses Javascript to hide/show the two prices. We are not cacheing the page with ex-tax or incl-tax so the cache will not affect the page. Hope that clarification helps.

OK, if you’re using Javascript and both prices are on the page HTML, I can now understand how a cache plugin wouldn’t affect your plugin. Thanks!