• Resolved guglielmirent

    (@guglielmirent)


    Good morning, I would like to know if it is possible to insert (or if there is a plugin) a switcher to show prices with the (VAT) rate (basically by clicking the switcher I can see prices including VAT or excluding VAT)
    Thank you

Viewing 1 replies (of 1 total)
  • Roxy

    (@roxannestoltz)

    Hi @guglielmirent ,

    Thanks for reaching out!

    I understand that you would like to implement a switcher that toggles between displaying prices including VAT and excluding VAT, is this correct?

    Are you looking for this option to be implemented on the front end of the site for users to control the way prices are displayed (incl. or excl. VAT)?

    If so, while I am unable to find a plugin that can help you achieve this, I have found?this?snippet. Although the snippet provided there does not mention creating a switcher/toggle, it allows for both prices including VAT, and prices excluding VAT to be displayed at the same time.

    I have tested this snippet on my staging site which has the latest version of WooCommerce and WordPress, and uses the Storefront theme, and it works as expected. Here are the results:

    Example of prices displayed before code:

    Example of prices displayed after code:

    You need to add the code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme.

    If this is not exactly the solution you are looking for, since custom coding is outside our scope of support, your best bet is to ask on any of these channels for support. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, too.

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Switcher vat rate frontend’ is closed to new replies.