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.