What can we help you with?

Exclude or Hide Tax Calculations Based on WooCommerce User Roles

This is a business case from a customer using ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing.He wants to exclude tax for the wholesale user role but show tax for other user roles in the cart or checkout page only. He wants to hide tax in the product page or the shop page for all user roles and show tax in cart and checkout page for all users except the wholesale user role. Without the ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing, using only WooCommerce standard tax options you can hide tax completely or in shop or cart page, but you cannot choose the user roles to which that applies. So using our plugin you can choose which tax class to use for a certain user role and also whether to show or hide tax for individual user roles in cart and checkout pages.

In this article I’ll explain in detail what are the requirements to achieve this and how to configure this in the woocommerce tax settings.

Requirements:

WooCommerce Tax Settings Configuration.

To set up the tax options in WooCommerce you first need to enable tax in WooCommerce  General Settings.
Now you’ll get the Tax tab in the WooCommerce menu. Now to exclude tax for the wholesale user role, first you need to define a zero tax class, go to tax settings and and add zero tax class under the additional tax classes, and choose the option to display prices excluding tax on the shop page and display prices on the cart page excluding tax. Note you can choose this same settings on the ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing plugin as well. 
To set up the Zero Tax Rates click on the option “Zero tax rate” just next to the ‘Standard Rates’ and to apply to all countries you can leave the country field and state, zip code fields blank. It will auto-fill with asterisk * or you can fill it manually with asterisk. And under the rate % column, add 0.00. This will apply to all countries, charge 0% tax if Zero tax class is applied. 
If you want to charge tax for few user roles in cart and checkout pages, you’ll have to define a standard tax class as well. Say you want to charge 15% tax for the country US. Then, under the Standard tax class, edit it or add a new row and under the country field enter the country code US. If you want it to be state specific, then add the state code in the state field or if you want to apply to all states, you can fill it with asterisk *. And, if you want the tax to apply to shipping you can enable the check box in the ‘Shipping’ column. 
Please note: The ‘Calculate tax based on’ should be based on the customer’s billing address or shipping address. And the Shipping tax class should be based on the the cart items, it should not be based on a specific class.

ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing

You can purchase the plugin from our site, here is the link – ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing. Once purchased you can download and install the plugin in the WordPress Plugin page. and you’ll get the  “Role Based Pricing” tab in the WooCommerce menu.  
Now this plugin can be used for many different purposes related to user roles. You can show or hide prices, add to cart button, or even specific products for different user roles. You can give a discount or add mark up prices to categories for user roles, and also assign individual product prices as per the roles. You can also add/delete user roles using this plugin. But in this article we’ll discuss about how to set different tax classes for different user roles.

Solution:

As per the required business case, we need to exclude tax for the wholesale user role and hide tax for the other users in the shop page and display tax in the cart and checkout pages. We’ve already configured two tax classes where the “standard class” will charge 15% tax and the “Zero Tax Rate” class will give 0% tax. To assign this to different user roles you can go to the plugin settings. Under the WooCommerce menu, go to Role Based pricing > Tax Options. Under the tax options you can see different user roles and the tax class associated to it, and also the tax type to show hide tax in shop/ cart page. So now for the wholesale user role, choose the tax class as Zero tax, and for the other roles you can set as default. By default the tax class is “Standard Rates” so by choosing the tax class as default it will bring up the standard tax class rates. And if you want to show the product price excluding tax in the shop and product page you can choose the tax type as “Show price excluding tax in shop”. We have different tax types, to hide tax in shop as well as the cart and checkout page, and tax will include only during payment. you can choose a different tax type for the user roles if you need to display tax for different users with or without tax. 

With this solution whenever the wholesale user login and purchase any product from the shop, no tax will be included in shop or cart page or even during payment. The reason most shop owners do not want to include tax is because the wholesale users already have their own TAX ID where the tax charged will differ. But for other user roles they need to include tax but they can choose to hide the tax being charged. and show the tax charged only during payment and in the invoice. The price of the product displayed in shop may vary depending on the option in WooCommerce settings where you can choose to enter the product price including or excluding tax. So if you had entered the product price excluding tax and you’re showing the product price including tax then in the shop page the product price will show the total price where tax is added to the product price. But, if you had entered the product price including tax and you’re showing the product price excluding tax then in the shop page the product price will show the total price where tax is deducted from the product price.

Cart when wholesale user role login shows without tax: 
Cart when other user role login shows with tax: 

Hope this article have helped with the business case, if you have any queries or face issues you can always contact our support team here.


To know more about the plugin click and to purchase the plugin you can click here. To know how to set up or how to use other features of the plugin click here:

You can also check out other WooCommerce and WordPress plugins in ELEX.

Previous How to translate ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing Plugin using WPML?
Next How to add a Suffix to WooCommerce Product Prices based on User Roles? (with Video)
You must be logged in to post a comment.