Display Prices Excluding Tax for B2B Users and Including Tax for B2C Users in WooCommerce – Configuring Tax Exemptions

B2BKing allows you to display prices inclusive of tax for B2C and exclusive of tax for B2B.

Tax can be removed completely, or it can be removed from shop pages but added back on the cart and checkout pages.

Here's how to configure this:

Step 1) WooCommerce Settings #

The following configuration is recommended.

Go to WooCommerce-> Settings-> Tax and set the following:

  • Display prices in the shop: including tax
  • Display prices during cart and checkout: including tax

In WooCommerce -> Settings -> Tax -> Standard Rates, make sure the rates are set:

If tax percentage rates are not set for your customer's billing country, the tax exemption will not work!

Step 2) Tax Exemption #

Configure a tax exemption by going to B2BKing -> Dynamic Rules -> Create a new rule and applying the following configuration:

  • Rule type: Tax Exemption
  • Applies to: All registered B2B users
  • Select which countries this should apply to (use CTRL+A to select all, if applicable)
  • Requires: Nothing
B2BKing Tax Exemption Configuration

After following these steps, B2B users should now see prices exclusive of tax.

Require VIES-Validated VAT ID #

You may want to exempt from tax only users who have provided a valid EU VAT number. To do this, choose "Requires: VIES-Validated VAT ID":

Important Note: If you set this to VIES-Validated VAT ID, it will only work for customers who have added and validated a real EU VAT number.

The VIES checkbox must be enabled for your VAT field in B2BKing -> Registration Fields before customers add their VAT numbers.

VIES must be enabled for exemptions set to "VIES-Validated VAT ID" to work.

Validate VAT Numbers During Checkout #

The easiest setup, and our recommendation, is to disable checkout for logged-out users (forcing users to log in before placing an order). This is our preferred approach, as it avoids various issues and potential conflicts.

To do this, go to WooCommerce -> Settings -> Accounts and disable guest checkout:

This way, VAT numbers are only verified during registration. You can also make the VAT field required in B2BKing -> Registration Fields -> VAT, so that only users with a valid VAT number can register on the site.

Another option is to validate VAT numbers during checkout.

To do this, go to B2BKing -> Settings -> Other and enable the "Validate VAT button at checkout" setting.

This will add the following button to the checkout page:

If this button is clicked and a valid VAT number is entered, a tax exemption will be applied, automatically removing tax from the order.

Note: For this tax removal to work for logged-out users, you must set the tax exemption rule to include logged-out users and set it to "Requires: VIES-Validated VAT ID." For example:

Additional Information #

Option: Pay Tax in Cart #

You may want B2B users to see prices exclusive of tax but still pay the tax at cart/checkout to comply with your country's regulations. To do this, use the option "Pay Tax in Cart: Yes" in the tax exemption configuration.

Option: Withholding Tax #

To display tax in the cart but not require B2B users to pay it, use the option "Pay Tax in Cart: Withholding Tax".

This will add the tax as a non-payable subtotal (informational only).

This is equivalent to the French "retenue à la source" or the Italian "ritenuta d'acconto."

Zero Tax Products #

In some cases, you may want to remove tax from only specific products or categories. To do this, use B2BKing's Dynamic Rule: Zero Tax Products. This rule allows you to select specific products or categories and specific user groups.

Configuration example for the "Clothing" category with Zero Tax Products

Entering Prices Including vs Excluding Tax #

By default, WooCommerce uses a single global setting to determine whether product prices are entered including or excluding tax (under WooCommerce → Settings → Tax → "Prices entered with tax").

This setting controls how WooCommerce interprets the prices you type into the backend product editor - it is separate from tax exemptions, which control how prices are displayed and charged on the frontend.

In some cases, you may want to enter B2C product prices including tax, but B2B product prices excluding tax. To achieve that, add the following code snippet:

add_filter('option_woocommerce_prices_include_tax', function($val){
    $is_b2b = get_user_meta(get_current_user_id(), 'b2bking_b2buser', true);
    if ($is_b2b === 'yes'){
        return 'no'; // B2B: prices entered excluding tax
    }
    return 'yes'; // B2C: prices entered including tax
}, 10, 1);

Code Snippets #

For a list of code snippets and other useful information, please also see the VAT and VIES Validation article.

Troubleshooting – Common Issues #

If you experience tax exemption issues, here are a few things to check:

  • Please note that the plugin may conflict with other EU VAT compliance plugins, so we recommend deactivating all other such plugins on your site.
  • In most cases, we do not recommend enabling B2BKing -> Settings -> Other Settings -> VAT -> "Within EU, require delivery country to be different than shop country for VAT exemption," as it can create exemption issues. It is intended only for niche cases.
  • If your exemption is set to "Requires: VIES-Validated VAT ID," please note it will only work if the VIES checkbox is enabled and the customer has added (and validated) a real EU VAT number.

Common Tax Setups #

Tax Setup for an EU Store #

B2BKing works well for stores in any country, but tax configuration can be particularly challenging for EU-based stores. B2BKing simplifies this process significantly.

A very common tax setup for an EU store (for example, an Italian store) is the following:

  • Italian buyers: Both B2C and B2B customers pay VAT.
  • EU buyers outside Italy (e.g. Spain, France): B2C customers pay VAT. VIES-validated B2B customers do not pay VAT (reverse charge mechanism).
  • Non-EU buyers (e.g. Morocco, USA): Neither B2C nor B2B customers pay VAT.

Here's how to achieve this, along with a few useful tips:

Step (1) — Go to WooCommerce → Settings → Tax and set "Calculate tax based on" to Customer billing address.

Step (2) — In WooCommerce → Settings → Tax → Standard Rates, add VAT rates for all EU countries. Do not configure rates for non-EU countries, and do not add a catch-all "*" rate that applies to all countries. This way, WooCommerce will only charge tax to EU-based buyers by default.

Step (3) — In B2BKing → Dynamic Rules, create a "Tax Exemption" rule. In this rule, select "B2B Customers" and select all EU countries except Italy as the applicable countries.

We recommend setting "Requires: Nothing" for the simplest setup. To ensure that only legitimate businesses receive the exemption, we recommend validating VAT numbers during registration. To enable this, go to B2BKing → Registration Fields → VAT and turn on "VIES Validation" under the VAT field settings.

Useful Tip: Keep Prices Consistent Across Locations

Many store owners prefer to add the following code snippet to their site (e.g. in the theme's functions.php or via a code snippets plugin):

add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' );

What This Does

Without this snippet, a €299 product might show as €296 in Spain or €302 in Germany, because WooCommerce adjusts the displayed price based on each country's VAT rate. Adding this snippet keeps the displayed price constant at €299 for all buyers, regardless of their location. Only the VAT/net split inside that price changes.

Example

Suppose you have a product priced at €299 (entered inclusive of Italian VAT at 22%). With the snippet above, here's what different buyers would see:

BuyerLocationVAT RateDisplayed PriceWhat They Pay
B2BItaly22%€299 incl. VAT€299 (VAT goes to the state)
B2B (tax exempt via B2BKing)Spain0% (reverse charge)~€245 ex. VAT~€245 (net price only)
B2C or B2BMorocco0% (non-EU)€299 (no VAT)€299 (full amount is product price)

Powered by BetterDocs