Wholesale and B2B (B2BKing, WholesaleX, Whols and More)
Wholesale customers need different things from their account than retail shoppers: purchase lists, bulk order forms, credit, quotes. WC Account Portal works with six wholesale and B2B plugins. It knows which customers are wholesale, lets you show menu items and a Dashboard layout to them only, adds the plugins’ account pages to the menu in one click, and shows their credit, wallet, lists and quotes as Dashboard boxes.
Supported plugins#
| Plugin | Tested with |
|---|---|
| B2BKing | 5.6.71 |
| WholesaleX | 3.1.0 (Pro) |
| Whols | 2.4.17 (Pro) |
| Wholesale For WooCommerce | 3.3.0 |
| WooCommerce Wholesale Pro (Barn2) | 2.5.0 |
| WPC B2B & Wholesale Suite | 1.0.5 |
They show as Customer groups, account pages and Dashboard boxes in the Supported plugins dialog on WooCommerce > Account Portal > Integrations. B2BKing counts as active unless its plugin status is set to disabled in B2BKing’s settings.
Set it up#
- Go to WooCommerce > Account Portal > Menu Items.
- Under Extra pages: add in one click, click Add to menu next to each wholesale page you want (see the list below). Pages for wholesale customers start with Who sees it set to All wholesale customers.
- Check Who sees it on each row and change it if needed.
- Click Save Settings.
- Go to WooCommerce > Account Portal > Dashboard, pick All wholesale customers (or one group) in Layout for, switch on Give group their own layout, arrange the widgets and click Save Settings.
- In the Summary boxes panel, switch the wholesale boxes on or off.

Customer groups: who is wholesale#
When at least one wholesale plugin is active, Who sees it (Menu Items) and Layout for (Dashboard) get these extra choices next to your WordPress roles:
| Choice | Who is in it |
|---|---|
| All wholesale customers | Customers any active wholesale plugin treats as wholesale or B2B (see below) |
| Retail customers (not wholesale) | Logged-in customers who are not wholesale |
| Group (B2BKing group) | Customers in that B2BKing customer group. Subaccounts belong to their main account’s group. |
| Role (WholesaleX role) | Customers with that WholesaleX role (the guest role is not listed) |
| Group (Wholesale group) | Customers in that Wholesale For WooCommerce group |
Plugins whose groups are WordPress roles (Whols, WooCommerce Wholesale Pro, the roles of Wholesale For WooCommerce) need nothing extra: their roles are already listed with your other roles.
Who counts as a wholesale customer, for All wholesale customers:
| Plugin | Wholesale when |
|---|---|
| B2BKing | B2BKing says the customer is a B2B user |
| WholesaleX | The customer has a WholesaleX role other than guest or B2C, and their WholesaleX status is active |
| Whols | The customer has a role that is one of Whols’ wholesale roles |
| Wholesale For WooCommerce | The customer has one of its wholesale roles, and their application is not waiting or rejected |
| WooCommerce Wholesale Pro | The customer has a wholesale role of the plugin, other than the pending role |
| WPC B2B & Wholesale Suite | The customer matches one of its B2B roles |
Customers whose application is still pending count as retail.
Which Dashboard a customer gets#
A customer can be in several audiences at once (Customer, a wholesale role, a B2BKing group, All wholesale customers). They get the layout of the most specific one that has its own: a plugin’s customer group first, then a role other than Customer, then All wholesale customers or Retail customers (not wholesale), then Customer. Customers in none of them get the main layout.

Account pages you can add in one click#
Each page only appears under Extra pages while it is switched on in the wholesale plugin. The address is the one set in the plugin, so a renamed endpoint keeps working. Pages marked “Wholesale only” start with Who sees it set to All wholesale customers; the others start on Everyone.
| Plugin | Page | Default address | Starts as |
|---|---|---|---|
| B2BKing | Purchase lists | purchase-lists | Wholesale only |
| B2BKing | Bulk order | bulkorder | Wholesale only |
| B2BKing | Offers | offers | Wholesale only |
| B2BKing | Conversations | conversations | Wholesale only |
| B2BKing | Subaccounts | subaccounts | Wholesale only |
| B2BKing | Company credit (credit add-on) | company-credit | Wholesale only |
| WholesaleX | Purchase lists | wholesalex-purchase-list | Wholesale only |
| WholesaleX | Bulk order | wholesalex-bulkorder | Wholesale only |
| WholesaleX | Wallet | wholesalex-wallet | Everyone |
| WholesaleX | Conversations | wsx-conversation | Everyone |
| WholesaleX | Subaccounts | wsx-subaccount | Wholesale only |
| Whols | Bulk order | whols-bulk-order | Wholesale only |
| Whols | Saved lists | whols-saved-lists | Wholesale only |
| Whols | Wallet | whols-wallet | Everyone |
| Whols | Conversations | whols-conversations | Wholesale only |
| Wholesale For WooCommerce | Requisition lists | requisition-list | Everyone |
| Wholesale For WooCommerce | Quotes | my-quotes | Everyone |
| Wholesale For WooCommerce | Become a wholesale customer | upgrade-account | Everyone |
| Wholesale For WooCommerce | Announcements | group-announcement | Wholesale only |
| Wholesale For WooCommerce | My customers (sales agents) | agent-customers | Everyone |
| Wholesale For WooCommerce | Commissions (sales agents) | commissions | Everyone |
| WPC B2B & Wholesale | Wholesale application | wholesale-registration | Everyone |
All of them open inside the portal with its design; the content comes from the wholesale plugin. Some WholesaleX pages need WholesaleX Pro.
For My customers and Commissions, set Who sees it to the sales agent role, as the page descriptions suggest. For Become a wholesale customer and Wholesale application, you may want Retail customers (not wholesale).
Single pages opened from these lists (one purchase list, one conversation, one subaccount, a new list in B2BKing; one agent customer in Wholesale For WooCommerce) keep their list highlighted in the menu.
Hiding a menu item with Who sees it removes it from the menu. Who can use the page itself is still decided by the wholesale plugin.
WooCommerce Wholesale Pro has no account pages of its own; it works through customer groups.
Dashboard boxes#
| Box | Plugin | Shows | Wholesale customers only |
|---|---|---|---|
| Purchase lists | B2BKing | Lists of the customer’s company (main account and subaccounts). Needs purchase lists on in B2BKing. | Yes |
| Available credit | B2BKing (credit add-on) | Credit limit (customer, then group, then default) minus credit used | Yes |
| Wallet | WholesaleX | Wallet balance (needs the WholesaleX wallet) | No |
| Purchase lists | WholesaleX | Number of saved purchase lists | Yes |
| Wallet | Whols | Wallet balance | No |
| Saved lists | Whols | Number of saved lists | Yes |
| Quotes | Wholesale For WooCommerce | Number of the customer’s quotes | No |
| Available credit | WPC B2B & Wholesale | Credit limit minus credit used. Needs credit on in the plugin. | Yes |
Amounts show in your store currency. Every box except Available credit (WPC) links to its account page and only shows when that page is in the menu; the WPC credit box has no page to link to, so it is not a link. Boxes marked “Yes” only show to customers in All wholesale customers.
Settings at a glance#
| Setting | Where | Default | What it does |
|---|---|---|---|
| Wholesale pages | Menu Items > Extra pages: add in one click | Not added | Adds the plugin’s account pages to the menu. |
| Who sees it | Menu Items, on each row | Everyone, or All wholesale customers for wholesale pages | Shows a menu item only to the chosen roles and groups. |
| Layout for | Dashboard tab | Everyone (main layout) | Pick a role or group to give it its own Dashboard. |
| Wholesale boxes | Dashboard > Summary boxes | On | Shows or hides each box. |
For developers#
Put these snippets in a child theme’s functions.php or a code snippets plugin.
Change the one-click pages#
wap_wholesale_pages receives the list of pages. Each page is an array with id (the endpoint), label, icon, plugin, desc and wholesale (true starts Who sees it on All wholesale customers). Only id is required: a page without one is skipped, and missing fields are filled in (label defaults to the id, icon to storefront, plugin and desc to empty, wholesale to false). Only add pages whose endpoint exists on your site.
add_filter( 'wap_wholesale_pages', function ( $pages ) {
foreach ( $pages as &$page ) {
if ( 'offers' === $page['id'] ) {
$page['label'] = 'Your offers';
}
}
return $pages;
} ); Add your own customer groups#
wap_audiences adds choices to Who sees it and Layout for (key => name); wap_user_audiences says which of them the current customer is in. Use both together.
add_filter( 'wap_audiences', function ( $list ) {
$list['vip_trade'] = 'VIP trade customers';
return $list;
} );
add_filter( 'wap_user_audiences', function ( $keys, $user ) {
if ( get_user_meta( $user->ID, 'vip_trade', true ) ) {
$keys[] = 'vip_trade';
}
return $keys;
}, 10, 2 ); The vip_trade key and meta are examples. For Wholesale For WooCommerce, the portal reads the plugin’s own wholesale_requisition_list_url and wholesale_upgrade_account_url filters to find those two pages, so changing them in that plugin also changes the page the portal adds.
Related#
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!