GuideBlog Posts

Role-Based Pricing in WooCommerce: Step-by-Step B2B Setup

Use the Role Based Pricing for WooCommerce plugin to show role-specific prices instead of duplicate stores or separate wholesale sites.

Role-Based Pricing in WooCommerce: Step-by-Step B2B Setup
Photo: Max Fischer / Pexels
TL;DR

WooCommerce shows one price to all users out of the box. A role-pricing plugin adds per-role rules for products, categories, or both. Plan about an hour for a simple wholesale setup, plus testing with a real customer account.

Key takeaways

  • WooCommerce has no built-in role pricing; a plugin is required.
  • Create the user role before setting price rules, or the rules have no target.
  • Test in an incognito browser with a wholesale role account before launch.
  • Sale prices, coupons, and page cache are the usual culprits when role prices don't show.

What You’re Setting Up and How Long It Takes

Role-based pricing shows wholesale and B2B buyers a different price than guests and retail customers without cloning products or running a second store. Expect 35–60 minutes total: 20–40 minutes for plugin setup, 15–20 minutes for testing with a real customer login.

If you already know your wholesale role names and discount rules, configuration is mostly clicking settings. The plugin is $4.99 on WorldPressIT if you don't have a license.

  • Customer roles for wholesale or B2B buyers
  • Per-role price rules for products and categories
  • Fallback behavior for guests and logged-out visitors
  • Conflict checks for sales, coupons, caching, and logged-in states
Professional man intently reviewing paperwork at his workstation indoors.
Photo: Vanessa Garcia / Pexels

Prerequisites: Accounts, Roles, and Backup Basics

Before you touch pricing rules, confirm customer accounts are enabled, the wholesale role exists, and you have a rollback point. Allow 10–15 minutes for this prep; it prevents most failed B2B launches.

  1. Create a staging copy or full backup Use a staging site or back up your database and wp-content first. A broken price rule can lock customers out of checkout, and a rollback is faster than debugging live orders.
  2. Enable customer registration Go to WooCommerce > Settings > Accounts & Privacy. Enable "Allow customers to create an account on the 'My account' page", and if you want guest-to-account conversion later, enable "Allow customers to log into an existing account during checkout".
  3. Create the wholesale role and assign a test user WooCommerce has no role editor built in. Use a role plugin or the snippet in the next section to add a role like wholesale_customer, then assign a test customer to that role under Users > All Users.
  4. Assign products to categories Open Products > Categories and create a Wholesale category. Assign it to products you plan to price by category.
WorldPressIT All-Access

Every plugin and theme in this article, plus 11,000+ premium WordPress plugins and themes, in one membership.

From $14.99/month, or one lifetime payment. Cancel anytime.

See membership plans

Create Customer Roles for Wholesale or B2B Buyers

Allow five minutes after registration and backup are in place. Create a wholesale_customer role, then add one test account under that role.

  1. Create the role with a role editor or a small snippet Use a role editor plugin to clone the built-in customer role and name it wholesale_customer. For code, add the snippet below to a site-specific plugin or child theme.
  2. Open Users > Add New User Fill in username, email, name, and a strong password; keep the notification box checked so the test user receives their login details.
  3. Assign `wholesale_customer` in the Role dropdown Select wholesale_customer and click Add New User. If the role does not appear, confirm the role editor saved it or the snippet ran, and clear object cache if you use one.
add_action( 'init', function () {
    $customer = get_role( 'customer' );
    if ( $customer && ! get_role( 'wholesale_customer' ) ) {
        add_role( 'wholesale_customer', 'Wholesale Customer', $customer->capabilities );
    }
} );

Install and Configure Role Based Pricing for WooCommerce

Install Role Based Pricing for WooCommerce like any other premium plugin: download the zip from WorldPressIT, upload it, activate it. The plugin adds role-specific price fields to the standard product edit screen.

  1. Download the plugin Download Role Based Pricing for WooCommerce v2.2.5 (updated November 17, 2026) from WorldPressIT or your order history.
  2. Upload and activate In wp-admin, go to Plugins > Add New > Upload Plugin, choose the zip file, and click Install Now. Activate when prompted.
  3. Open the settings screen After activation, open the new Role Based Pricing settings screen under WooCommerce or a similarly named tab. Set the default behavior for unlisted roles and save.
  4. Check the product edit screen Edit any product and find the role pricing section below the standard price fields. Enter per-role prices there, or use the plugin's bulk area to adjust multiple products if available.
Role Based Pricing for WooCommerce

Plugins

Role Based Pricing for WooCommerce

Role Based Pricing for WooCommerce v2.2.5 sets per-role prices on products and categories. $4.99 on WorldPressIT.

v2.2.5 · Updated November 17, 2026Get it for $4.99

Set Product and Category Price Rules

A simple product role price takes under two minutes. Category-wide discounts take another minute and apply to every product assigned to that category, making them best for uniform wholesale tiers.

  1. Open the product Open Products > All Products and click Edit under the product name. The role pricing panel sits below the General tab on the product data screen.
  2. Enter the role price Find the Role Based Pricing section, choose the wholesale role (for example wholesale_customer), and type the discounted price. Leave the field blank for roles that should see the regular price.
  3. Save the product Click Update. Log out or open a private window and test as that role to confirm the price displays correctly.
  4. Set a category rule Go to Products > Categories and edit the target category. In the role pricing settings, enter a fixed discount or percentage off for the same role, then save.
  5. Check for conflicts Products with their own role price override category rules. If a product shows no discount, check for a different per-role price already set on that product.
Tiered Pricing Table for WooCommerce

Plugins

Tiered Pricing Table for WooCommerce

Shows quantity-based price breaks in a table on the product page, which suits volume-based wholesale pricing better than a single per-role price.

v10.4.11 · Updated December 3, 2026Get it for $4.99

Test Role Prices Without Locking Out Guests

Testing role prices takes about 10 minutes. Use a test user assigned to wholesale_customer, a product with a role price rule, and two browser windows: one normal, one incognito. Role price rules do not lock out guests; they only change prices for logged-in matching users.

  1. Browse as a logged-out guest Open your store in a normal browser window and visit a product with a role price. Confirm you see the regular WooCommerce price, not the wholesale price.
  2. Log in as the wholesale test user Open an incognito or private window, go to /my-account/, and sign in with the test user assigned to wholesale_customer. Do not use an administrator.
  3. Check the product page and cart total Return to the same product page. The price should match the role rule for the product or its category. Add it to the cart and check the cart line total and order total.
  4. Confirm guest pricing still works Close the incognito window and return to the normal window. If guest checkout is enabled, add the same product and confirm it uses the standard price.

Fix Common Conflicts: Sales, Coupons, Cache, and Logged-In States

When role prices don't show, check sale price and logged-in state first; page cache and coupon stacking cause the next most common failures. Reproduce the issue with the custom wholesale role, not an administrator. The same test flow appears in Wholesale WooCommerce plugins: quotes, roles and freight, and checkout-level causes are covered in 5 WooCommerce conversion plugins.

Frequently asked questions

Does WooCommerce have built-in role-based pricing?

No. Core WooCommerce shows the same price to every visitor. Role-based pricing requires a plugin like Role Based Pricing for WooCommerce or custom code to add per-role price fields.

Can I set role prices per product or per category?

Yes. You can set a price for a role on an individual product, or set a discount/price rule on a product category. A product-level rule overrides a category rule for that product.

Will role-based pricing work with variable products?

It works, but each variation needs its own role price. The main product's role price does not apply to all variations automatically. For quantity-based tiers, use a tiered pricing table plugin instead.

How do I hide store prices from guests?

Role-based pricing changes prices for logged-in matching roles but does not hide prices from guests. Use a catalog mode or wholesale plugin that removes prices and add-to-cart buttons for logged-out visitors. The plugin covered here focuses on per-role pricing, not price hiding.

What happens when a user changes roles or logs out?

A logged-out user or a user moved to a role without a price rule falls back to the regular WooCommerce price. Role changes take effect on the next page load, but cached pages or active sessions may delay the update. Test in an incognito window after changing a role.

Do I need a separate wholesale site?

No. You keep retail and wholesale customers on one WooCommerce store. Assign wholesale roles and price rules instead of duplicating products or running a second site.

Share X LinkedIn Facebook
Giora Denzel
Written by

Giora Denzel

E-commerce builder. Giora runs WooCommerce, membership and course projects for small brands, and writes about payments, subscriptions, LMS, bookings and the tooling behind online stores.

Products in this article

Browse all