WooCommerce B2B Plugin — Role-Based Pricing & Customer Management
Overview
The WooCommerce B2B plugin provides a self-contained system for managing wholesale/B2B customers. Its core features — role-based pricing, shipping restrictions, payment restrictions, and registration approval — are all tightly coupled to the plugin's own user role framework. Any custom registration or management logic built outside the plugin will bypass these features and create an unmanageable, fragmented system.
Key principle: Do everything inside the B2B plugin. Do not build parallel registration forms or user management flows outside it.
Observed in practice on the [1] B2B WooCommerce site build.
Core Concepts
User Roles as the Unit of Configuration
The B2B plugin manages customer behavior at the role level. Each role carries its own rules for:
- Pricing — fixed prices, percentage discounts, or tiered quantity pricing
- Shipping — which shipping methods are available
- Payment — which payment methods are available (e.g., block credit cards, allow cash on delivery only)
- Order limits — minimum and maximum order quantities or amounts
- Product visibility — which products or categories a role can see
This mirrors how Salesforce handles permission sets: you define the rules on the role, then assign users to it.
One Role Per Customer (Initial Strategy)
For a new B2B setup with varied customer terms, the recommended starting approach is one unique role per customer. This provides maximum granularity and avoids assumptions about which customers share identical terms.
Benefits:
- Full control over each customer's pricing, shipping, and payment terms
- Roles can be cloned for new customers with similar terms, then renamed and adjusted
- If a contact leaves a company, the new contact simply gets assigned the same role — no reconfiguration needed
As the customer base grows and patterns emerge, roles can be consolidated (e.g., "10% discount tier," "15% discount tier") to reduce maintenance overhead.
Implementation Guide
Step 1: Read the Plugin Documentation
Before configuring anything, both the project manager and developer should read the B2B plugin documentation top to bottom. The plugin has many interconnected features; understanding the full scope prevents wasted effort.
Step 2: Create User Roles
Navigate to B2B Settings → User Role Manager.
For each customer (or customer tier):
1. Create a new role with a descriptive key (e.g., madison_co_op, east_coast_wholesale_tier1)
2. Set capabilities — or copy an existing role and modify it
3. Configure role-specific rules (see Step 3)
Order matters: Create and configure all roles before creating user accounts. Assigning a role to a user is the last step, not the first.
Step 3: Configure Role-Based Rules
For each role, configure the following in the B2B plugin settings:
Pricing
- Go to Role-Based Pricing
- Options: fixed price override, percentage discount, or tiered pricing table (e.g., 1–10 units = $9, 11–30 units = $8)
- Use Price Templates to apply pricing rules across product sets
Shipping
- Go to Shipping → Select Shipping Methods by User Role
- Restrict which methods appear at checkout for each role
- Example: local delivery customers see only "Free Delivery"; remote customers see flat-rate or weight-based options
- Rename generic methods for clarity (e.g., rename "Free Shipping" → "Free Delivery")
Payment
- Restrict payment methods per role
- Example: require prepayment (Stripe/PayPal) for new or high-risk customers; allow Cash on Delivery for established local accounts
Order Limits
- Enforce minimum order quantities (e.g., must order at least 10 units to access wholesale pricing)
- Enforce maximum order quantities if needed (e.g., cap at one pallet)
Step 4: Configure the Registration Form
Navigate to B2B Settings → B2B Registration.
Key configuration decisions:
| Setting | Recommendation |
|---|---|
| Default registration fields | Enable; use as the base |
| Custom fields | Add any extras here (e.g., tax exemption certificate upload) |
| User role selection | Disable — do not let registrants choose their own role |
| Approve new users | Enable — prevents unauthorized access to wholesale pricing before review |
To add fields not in the default set (e.g., tax exemption certificate upload), use the Add New Field option within the registration settings. Do not build a separate form outside the plugin.
Why this matters: A registration form built outside the B2B plugin cannot connect to the plugin's role assignment, approval workflow, or email system. The plugin's native form is fully customizable and must be used.
Step 5: Customize Email Templates
Navigate to B2B Settings → Email Settings. Customize all three templates:
- Pending — Sent immediately after registration. Example: "Thank you for your interest in our wholesale program. We'll review your application and notify you within 24 hours."
- Approved — Sent when admin approves the account. Include next steps, login link, and contact info.
- Disapproved — Sent if the application is rejected. Keep professional; optionally include a contact for questions.
These emails are sent through the site's existing SMTP configuration. Ensure the B2B plugin's email settings point to the configured SMTP plugin rather than attempting a separate setup.
Step 6: Create User Accounts and Assign Roles
Once all roles are configured and tested:
- Create a user account (or have the customer register via the B2B form)
- Assign the appropriate client-specific role
- The user will receive their welcome/approval email and can log in to see their role-specific pricing, shipping, and payment options
Soft launch approach: Set up all roles and backend configuration first. Then create a small batch of user accounts for trusted clients to test the system before opening it broadly.
Supporting Data: The Customer Spreadsheet
Before building roles, compile a spreadsheet with one row per customer and columns for:
- Shipping terms — free delivery, flat rate, pickup only, etc.
- Pricing / discount — percentage off, fixed prices, tiered quantities
- Payment terms — prepayment required, cash on delivery, check, bank transfer
- Product restrictions — any products they cannot see or order
- Order limits — minimum/maximum quantities if applicable
This spreadsheet drives role configuration. Roles should not be built until this data is clean and confirmed with the client.
Common Pitfalls
| Pitfall | Consequence | Fix |
|---|---|---|
| Building registration form outside the B2B plugin | Role assignment, approval workflow, and email system all break | Rebuild inside the plugin using native fields + custom field additions |
| Creating user accounts before roles are configured | Users get assigned incorrect or no role; may see wrong pricing | Always configure roles first |
| Letting users select their own role at registration | Users can self-assign wholesale access | Disable role selection in registration settings |
| Skipping "Approve New Users" | Anyone can register and immediately see wholesale pricing | Enable approval workflow |
| SMTP misconfiguration in B2B email settings | Registration emails fail to send | Point B2B email settings to the existing site-wide SMTP plugin |
Related Articles
- [2]
- [3]
- [4]
- [5]