The ecommerce sector is seeing incredible growth, year after year, with no foreseeable end in sight. The same is true for B2B ecommerce, yet there aren’t many good platform choices available for small-to-medium businesses that want to sell wholesale. There are several SaaS solutions on the market, but these are costly, closed-source, and mostly oriented towards larger businesses.
WooCommerce B2B extension is an ultimate wholesale solution that allows you to create a store that serves both B2C and B2B customers. B2B for WooCommerce is built by integrating our 5 best-selling extensions and additional B2B features to make this a complete wholesale package. Why Buy B2B for WooCommerce? The ultimate wholesale plugin for WooCommerce that allows you to configure your store to display and sell products with wholesale prices. Boost the overall sales of your WooCommerce store by tenfold - Unlock powerful wholesale woocommerce features through a single plugin. Wholesale for WooCommerce Wholesale for WooCommerce extension that enables your store to display wholesale pricing for specific users. Wholesale prices are only visible for Wholesaler Customers, not for the other customers. Also, there is a Front end Wholesale Registration form which you can customize as per your requirement. Wholesale Prices (By Customers): To add a wholesale pricing rule for specific customers only, click on Add Rule under this heading. Customer: Specify particular customers only to whom this rule will apply. This field is powered by predictive text and will begin to list options after 3 or more characters are typed in.
If you are a business owner or developer, WooCommerce is a solution that’s free, versatile and powerful.
Is WooCommerce right for B2B shops?
“Out-of-the-box”, it isn’t. WooCommerce is a fantastic solution for ecommerce stores, but it wasn’t developed specifically for wholesale, so it lacks many important options at the outset. However, you can use a powerful wholesale plugin like B2BKing to extend WooCommerce and add all the business-to-business functionalities that you may need.
There are two other aspects that you should be aware of when choosing WooCommerce for your B2B project:
- WooCommerce will require regular plugin updates to ensure it’s secure and working correctly.
- Depending on your hosting and website configuration, the WordPress environment can sometimes perform a little slowly. However, there are ways to optimize and speed it up such as through plugins like WP Rocket (or other caching and optimization plugins).
While it’s not perfect, WooCommerce is currently powering more than 20% of the world’s online stores, and there are good reasons for that: it’s free, open-source, powerful and secure. These same qualities also make it a great choice for wholesale stores.
How does a B2B store differ from a typical e-store?
Selling business-to-business is often a very different and more personal experience than selling directly to consumers. Business buyers are knowledgeable, open to negotiation, and want to get great offers and discounts for buying in bulk. Price catalogs, discount options and payment and shipping options can vary widely from customer to customer, depending on factors such as business size, order size or existing business relationships.
From a website development standpoint this translates into a necessity for a high degree of technical flexibility when it comes to pricing, discounts, shipping and order rules.
Selling to businesses also introduces a need for features such as:
- Hiding prices for guests
- Business registration form
- VAT (or other tax ID) number support
- Tax exemptions
- Quote requests
- Custom billing and checkout fields
- Wholesale order form
- Ability to support multiple users on a buyer account (for corporate structures)
Let’s go ahead and look at how a few of these features can be implemented in WooCommerce. The next sections will be geared more towards developers and I will share a few code snippets that I hope you will find helpful, as well as free plugins that you can use.
1. Hide prices for guest users
Let’s start off with an easy one. You can do this with two WooCommerce filters. First, let’s use woocommerce_get_price_html to change the displayed price to “Login to view prices”.
Once we’ve done this, prices are no longer visible and will be replaced by our text. This is not enough though, since the user can still add these products to cart and see their price. A solution is provided to us by the aptly named woocommerce_is_purchasable filter.
After you add this, products should no longer be purchasable by guest users and the “add to cart” button will no longer be available. One more thing that’s worth mentioning is that you may get into trouble when using AJAX search forms, depending on how those are set up. A quick way to get that fixed is to also add the above code to your main code and check for AJAX by wrapping the code inside:
The end result:
If you are interested in a plugin alternative because you’re not familiar with coding, B2BKing has this and other guest access restriction functionalities such as an option to hide the website entirely, or hide prices for individual products or categories.
2. Business registration, or separate B2B and B2C registration forms
What you want to do here is add custom fields such as “Company Name”, “Address”, “VAT ID”, etc.
You can use this code to add a custom field for company name:
If you want to sync this field with the WooCommerce billing field for company name on registration, you can do this by using the woocommerce_created_customer hook and saving the company name as user meta, using the same fields that WooCommerce uses: billing_first_name, billing_company, billing_city, etc:
How can you create separate B2B and B2C form fields? You can add a “Select” field to registration in the way explained above and use a bit of JavaScript to determine whether the user chose “Individual” or “Company”. Show or hide registration fields like Company name depending on what the user chooses.
If you wish to avoid coding, there are some free plugin solutions to extend registration, such as https://wordpress.org/plugins/user-registration/ that also have options for multiple registration forms, though creating B2B-specific registration may require a little extra work on your side.
If you’re looking for a premium solution, B2BKing provides some handy, easy-to-use shortcodes that you can add to any page and create a business registration form.
3. Wholesale order form
Business customers often know exactly what they want, down to the SKU, so adding a wholesale order form to your website makes it quick to order for your customers, and makes you look professional.
How can you add one? There’s no quick code snippet that can do this, so I think a plugin is your best solution.
There’s a free plugin that I personally tested, which looks and works great: https://wordpress.org/plugins/woocommerce-bulk-order-form/
B2BKing also has its own proprietary implementation, which you can see in the next image:
4. Wholesale price structure
The relevant question here is: how to set up different prices for different users? There are 2 ways to go about this: change the price directly, or add a discount.
To add a cart discount for a user or category of users, use this code:
The code above uses a bit of a trick by adding a negative fee, which is a discount. The code above doesn’t do much, it just adds a 10 dollar discount for all users. Let’s expand the code a little:
How’s this? Now the code checks if the user’s meta status is ‘b2b’ and gives a discount only to b2b users.
How do you set the meta status? You could set that on registration using the woocommerce_created_customer hook that I used above in the 2nd article section, and a simple line of code. The function update_user_meta is used for both updating and creating user meta.
What if you want to set complex structures of different prices for different products for different users?
This gets a little more complicated but you can use the same principles. In WooCommerce, a product is a “post”, and you can set post meta data for it. For example, you can add a post meta named b2b_price, to have a separate price for b2b users. Here’s the code.
How do you show this price to b2b users only?
5. Setting up tax exemptions
This one’s easier than you think! There’s a very handy function that you can use in WooCommerce that will do this for you and even take care of price display in most situations: set_is_vat_exempt() . Good name, right?
This function will even make it so that B2B users see prices with the suffix “excluding tax”, while B2C users see prices saying “including tax”.
B2BKing – WooCommerce B2B & Wholesale Plugin
I hope some of what I shared above will be helpful to you. Equipping WooCommerce with B2B functionalities is a complex task though, and I wouldn’t fault you if you decided buying a premium plugin is a better use of your time than writing the code yourself 🙂 Really, I won’t judge you at all.
With that in mind, I’ll share a few words about B2BKing. This is a project me and my team have been working on for a while, with the goal of turning WooCommerce into a capable B2B solution, an alternative to the costly SAAS platforms.
We’re constantly developing and supporting it as a long-term project, and it currently has more than 137 features including business registration, tax exemptions, dynamic pricing rules, VAT support, built-in messaging system, multiple buyers on account, offers, a dedicated B2B&B2C hybrid mode, and much, much more.
This week, we are proud to have been hand-picked by Envato as its “Featured Plugin of the Week” and showcased on the CodeCanyon front page.
We offer a live demo that you can test at any time, both backend and frontend: Live Demo
If you have any questions about the article, about the plugin, or just want to say hi, don’t be shy! Feel welcome to reach out to your friendly neighbourhood plugin developer.
Related posts:
Add quantity based tiered pricing for all or specific customers and user roles.
Installation ↑ Back to top
Woocommerce Wholesale Order Form
- Download the .zip file from your WooCommerce account.
- Go to: WordPress Admin > Plugins > Add New and Upload Plugin the file you have downloaded.
- Install Now and Activate.
More information at Install and Activate Plugins/Extensions.
Setup and Configuration ↑ Back to top
After activation WooCommerce Wholesale Tiered Pricing extension, you can see “Wholesale Pricing” Tabs in the WordPress admin menu. Click to view settings and get started.
How to Add Tiered Pricing↑ Back to top
You can add tiered pricing based on customers and user roles by using 2 different ways,
- Rule Based
- Product Level
Rule Based: ↑ Back to top
All rules:
Clicking on Wholesale Prices or All Rules will show you a record of all the rules you create using this plugin. You can also edit and delete all wholesale price rules individually or in bulk whenever necessary. A filter is available in case you are searching for a rule by date.
Creating new rule
To add a wholesale price table you can either click on the Add New Rule button on the All Rules page or you can click access the Add New Rule section from your WP Menu. Each rule should be assigned a self-explanatory title as it will be shown in the All Rules section for future reference.
While creating a new rule you can configure the following options,
- Rule Priority: You must assign a numeric priority to each rule you create. 1 being the highest priority you can set and 100 being the lowest.
*(Note: if you create and apply multiple rules simultaneously, the rule with a lower numeric value will be considered higher in priority)
- Apply on All Products: This option allows you to apply this rule to All Products available in your database. By default this option is unchecked. Which is why it is followed by the following two fields:
- Select Products: Use this field to specify a product(s) for the rule. This field is powered by predictive text and will begin to list options after 3 or more characters are typed in.
- Select Categories: Place a check to select a specific or multiple categories.
Remember that placing a check on the Apply on All Products checkbox will remove the Select Products and Select Categories options as it no longer applies to your selection.

- Wholesale Prices (By Customers): To add a wholesale pricing rule for specific customers only, click on Add Rule under this heading.
- Customer: Specify particular customers only to whom this rule will apply. This field is powered by predictive text and will begin to list options after 3 or more characters are typed in.
- Adjustment Type: From the dropdown select if the price should be adjusted by a fixed increase/decrease, percentage increase/decrease or set a fixed price.
- Value: Type in the fixed or percentage amount that is to be applied to your price.
- Min Qty: Provide the Minimum Quantity of this tier
- Max Qty: Provide the Maximum Quantity of this tier
- Replace: Check this box to replace the original price.
- Wholesale Prices (By User Roles): To add a wholesale pricing rule for specific User Roles, click on Add Rule under this heading.
- User Role: Specify particular User Roles to whom this rule will apply. The dropdown will include a list of all available User Roles.
- Adjustment Type: From the dropdown select if the price should be adjusted by a fixed increase/decrease, percentage increase/decrease or set a fixed price.
- Value: Type in the fixed or percentage amount that is to be applied to your price.
- Min Qty: Provide the Minimum Quantity of this tier
- Max Qty: Provide the Maximum Quantity of this tier
- Replace: Check this box to replace the original price.
Once you have set your rule, hit Publish to save and apply the rule.
Product Level: ↑ Back to top
Once the extension is installed, you will notice new settings to add customer and role-based pricing. For variable products, you can see the price settings when you edit a variation.
General Settings↑ Back to top

From general settings, you can control the following options,
Activate Tiered Table ↑ Back to top
By placing a check in this checkbox you have enabled this plugin to display a tiered pricing table on your Product Page.
Impose Quantity Limits ↑ Back to top
If you check this checkbox your customer will no longer be able to add specified product(s) beyond your defined minimum and maximum quantity.
Error Message for Min & Max Quantity: ↑ Back to top
Error Message for Min
Customize a message to be shown to your customer when they add a quantity less than your defined minimum quantity.
**Note: Remember to use “%u” to represent the minimum quantity. If the message doesn’t contain this, it will remove the minimum quantity from your error message.
Error Message for Max Qty
Customize a message to be shown to your customer when they add a quantity more than your defined maximum quantity.
**Note: Remember to use “%u” to represent the maximum quantity. If the message doesn’t contain this, it will remove the maximum quantity from your error message.
Error Message for Update Cart
Customize a message to be shown to your customer when they update the quantity of a product after it has been added to their cart and it doesn’t fall into your defined limits.
**Note: Remember to “%pro” for Product Name, “%min” for Minimum Quantity and “%max” for Maximum Quantity. If the message doesn’t contain this, it will remove the product name, maximum and minimum quantity (based on the missing variable) from your error message.
Table Style Settings↑ Back to top
Use these settings to manage the appearance of the Table containing your wholesale pricing.
Header Color
Enter a Hex code value or the name of your color to assign a desired color to the header of the pricing table.
(Helpful Tip: It is advised to provide a hex code for color accuracy)
Odd Rows Color

Enter a Hex code value or the name of your color to assign a desired color to the odd rows of the pricing table only.
(Helpful Tip: It is advised to provide a hex code for color accuracy)
Even Rows Color
Woocommerce Wholesale Suite
Enter a Hex code value or the name of your color to assign a desired color to the even rows of the pricing table only.
Woocommerce Wholesale Login
(Helpful Tip: It is advised to provide a hex code for color accuracy)
Activate Border
Place a check in this box to enable a border to separate the information in your table.
Header Font Size
Use this field to assign your own font size for the header of the table. If this is left blank the font size provided by your default theme will be applied automatically.
Rows Font Size
Wordpress Wholesale Plugin
Use this field to assign your own font size for the rows of the table. If this is left blank the font size provided by your default theme will be applied automatically.
Price Settings (Apply on Standard or Special Price)↑ Back to top
Woocommerce Wholesale Pro
Here you will find a list of all available User Roles. Use the radio buttons to apply wholesale pricing to Regular or Sale price according to User Roles.
Woocommerce Wholesale Plugin
Click Save Changes each time you update a setting in order to apply it.

Comments are closed.