Tax Switch for WooCommerce

Beschrijving

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
  • Flexible display options for prices with and without VAT
  • Remembers the user’s preference for future visits

Voor meer informatie over deze plugin, bezoek de plugin pagina.

Compatibility

This plugin integrates with WooCommerce’s standard filters and actions for price display and calculation. While most plugins work out of the box, some third-party plugins use custom price building methods that require specific compatibility integrations. The following plugins have been tested and confirmed compatible:

  • WooCommerce Product Table
  • 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

If you encounter any compatibility issues with other plugins not listed above, please let us know. Your feedback helps us improve the plugin and extend compatibility to more third-party solutions.

WPML

To translate the option texts via WPML:

  1. Save your options first in: WooCommerce -> Settings -> Tax Switch
  2. Then translate the texts in: WPML -> String Translations and search for your option values in the domain ’tax-switch-for-woocommerce’

Vereisten

  • WooCommerce plugin installed and activated
  • WordPress 5.0 or higher (for Gutenberg block support)
  • WooCommerce tax calculations enabled:
    1. Go to WooCommerce > Settings > General
    2. Check the box for “Enable tax rates and calculations”
    3. Click “Save changes”
  • WooCommerce taxes configured:
    1. Go to WooCommerce > Settings > Tax
    2. Set up your tax rates and rules as needed for your store

Gebruik

After installation and configuration, you can add the tax switch to your pages in two ways:

  1. Gebruik het Gutenberg blok ‘Tax Switch for WooCommerce’ in je pagina- of berichteditor.
  2. Use the shortcode [wdevs_tax_switch] anywhere in your content.

Shortcode gebruik

Basic usage:

[wdevs_tax_switch]

The shortcode accepts several attributes to customize its appearance and behavior:

  • class-name: Adds custom CSS classes to the switch.
    • Standaard: is-style-default
    • Opties: is-style-default, is-style-inline, of custom classes
  • 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-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.

Voorbeeld met aangepaste attributen:

[wdevs_tax_switch class-name="is-style-inline" switch-color="#ffffff" switch-color-checked="#000000" switch-background-color="#000000" switch-background-color-checked="#4CAF50" switch-label-incl="Inc. Tax" switch-label-excl="Ex. Tax"]

This will display an inline-style switch with a white handle that turns black when on, a black background when off, green background when on, and custom labels for including and excluding tax.

You can also use this shortcode in your theme files with the do_shortcode() function:

<?php echo do_shortcode('[wdevs_tax_switch]'); ?>

Aanvullende informatie

For more information and other WordPress plugins, visit Wijnberg Developments.

Schermafdrukken

  • This GIF demonstrates the main functionality of the plugin.

Blokken

Deze plugin heeft 1 blok.

  • Tax Switch for WooCommerce Switch for toggling VAT prices.

Installatie

  1. Upload the plugin files to the /wp-content/plugins/tax-switch-for-woocommerce directory, or install the plugin through the WordPress plugins screen directly.
  2. Activeer de plugin via het ‘Plugins’ scherm in WordPress.
  3. Use the WooCommerce -> Settings -> Tax Switch screen to configure the plugin.

FAQ

Zijn er bekende compatibiliteitsproblemen?

Some WooCommerce Blocks are not fully compatible with this plugin as they do not use standard WooCommerce filters for price display. This is a known limitation of WooCommerce Blocks and not specific to this plugin. You can fix this by using WooCommerce shortcodes instead of the WooCommerce Blocks.

Beoordelingen

25 oktober 2024 1 reactie
I rarely write reviews, but Wijnberg Developments truly deserves 5 stars! I reached out for support and received help within minutes. They genuinely took the time to assist me and fully resolved my issue. 5/5 for Wijnberg Developments 5/5 for the plugin I have nothing but good things to say
22 oktober 2024 1 reactie
I reached out with an issue and got a response within minutes. The team was quick, professional, and solved my problem right away.
Lees alle 5 beoordelingen

Bijdragers & ontwikkelaars

“Tax Switch for WooCommerce” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

“Tax Switch for WooCommerce” is vertaald in 1 taal. Dank voor de vertalers voor hun bijdragen.

Vertaal “Tax Switch for WooCommerce” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

1.2.1

  • Added compatibility for WPML

1.2.0

  • Disable the plugin in the WooCommerce mini cart widget

1.1.11

  • Added compatibility for Product Add-Ons for WooCommerce

1.1.10

  • Added compatibility for JetEngine Listing Grid ‘infinity scroll’

1.1.9

  • Added extra check for filtering backend and frontend AJAX requests (which adds compatibility for PDF Invoices & Packing Slips for WooCommerce)
  • Fixed a bug where the admin request checks failed when WordPress is installed in a subdirectory

1.1.8

  • Added compatibility for YITH WooCommerce Product Add-ons & Extra Options Premium

1.1.7

1.1.6

  • Removed applying ‘woocommerce_get_price_html’ filter a second time to prevent nested duplications

1.1.5

  • Added extra checks for only executing the filters on the frontend

1.1.4

  • Improved compatibility for Tiered Pricing Table for WooCommerce

1.1.3

  • Migrated filters from only using ‘woocommerce_get_price_html’ to ‘woocommerce_get_price_html’ in combination with ‘wc_price’. This way, the plugin should be more compatible with other plugins.
  • Added compatibility for Discount Rules for WooCommerce
  • Added compatibility for Tiered Pricing Table for WooCommerce on catalog pages

1.1.2

  • Added compatibility for Measurement Price Calculator for WooCommerce.

1.1.1

  • Added compatibility for Tiered Pricing Table for WooCommerce Premium (single product page).

1.1.0

1.0.1

  • Fixed bug where JS was not loaded when element was rendered by shortcode.

1.0.0

  • Initiële release van Tax Switch for WooCommerce.