[Snippet] WooCommerce Conditional Suffix for VAT and Free Shipping Scenarios

If you are using price suffixes in WooCommerce, you may want to make them conditional based on different VAT and shipping cost scenarios. By default, the same suffix will be shown to all products across your store. This snippet helps you to show a different suffix based on VAT and free shipping scenarios.

Conditional display of VAT suffix

The snippet shows a text for ‘inc. VAT’ if the product is taxable and the customer needs shipping to a location within the European Union (or any other country you define in the array of countries). If you are using WooCommerce’s option to set the default customer location to ‘Geolocate’, this will result in a correct suffix depending on where your customer is accessing your store from.

Conditional display of shipping suffix

The snippet shows a different text for products priced over a defined treshold. Set the free shipping treshold to the amount you define in WooCommerce’s backend. As a result, you will see the text ‘free shipping’ or ‘plus shipping’ depending on what you are offering.

Get the snippet

Find this snippet on Github.

Need help?

Please let us know in the comments if the snippet does not work for you or if you need any help.

Share on whatsapp
WhatsApp
Share on email
Email
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

About the author

Discussion

Join the discussion about ‘WooCommerce Conditional Suffix for VAT and Free Shipping Scenarios’

No comment yet, add your voice below!


Add a Comment