Back to Blog

Setting Up WooCommerce for B2B and Wholesale

B2B buyers don't browse, they order. They know what they need, want to see trade pricing, and need to add 50 items efficiently. Here's how to configure WooCommerce for wholesale without expensive enterprise plugins.

B2B vs. B2C Requirements

B2C (retail) and B2B (wholesale) have different needs:

Feature B2C B2B
Product Display Visual grids, inspiration Tables, efficiency
Pricing Fixed public prices Tiered, negotiated, hidden
Ordering Single items, cart Bulk quantities, quick order
Account Optional guest checkout Required, with approval
Payment Immediate Often invoiced, net terms

WooCommerce defaults to B2C. Building B2B requires deliberate configuration.

The Lightweight B2B Stack

Instead of expensive B2B suites ($200-500/year), combine focused plugins:

  1. Product Table Pro Efficient product display
  2. Role Based Content Pro Hide/show content by user type
  3. User Role Editor (free) Create wholesale roles
  4. WooCommerce native Core functionality

Total cost: Under $100 one-time vs. $300+/year for B2B suites.

Step 1: Create Wholesale Roles

Add custom user roles for B2B customers:

// Add to theme functions.php or custom plugin
add_role('wholesale_customer', 'Wholesale Customer', array(
    'read' => true,
    'edit_posts' => false,
    'delete_posts' => false
));

add_role('trade_customer', 'Trade Customer', array(
    'read' => true,
    'edit_posts' => false,
    'delete_posts' => false
));

Or use the User Role Editor plugin to create roles visually.

Step 2: Configure Registration

B2B requires account approval. Options:

Manual Approval

Application Form

Use a form plugin to collect:

Approve manually based on submissions.

Step 3: Role-Based Pricing

Show different prices to different roles:

Option A: Discount by Role

Keep regular prices, apply automatic discounts:

// Apply 30% discount for wholesale role
add_filter('woocommerce_product_get_price', 'wholesale_discount', 10, 2);
function wholesale_discount($price, $product) {
    if (current_user_can('wholesale_customer')) {
        return $price * 0.70; // 30% off
    }
    return $price;
}

Option B: Separate Price Fields

Use ACF to add "Wholesale Price" fields to products, display based on role.

Option C: Hidden Pricing

Hide prices entirely for non-logged-in users:

add_filter('woocommerce_get_price_html', 'hide_price_for_guests', 10, 2);
function hide_price_for_guests($price, $product) {
    if (!is_user_logged_in()) {
        return '<a href="/register">Login for pricing</a>';
    }
    return $price;
}

Step 4: Product Table Display

Replace grid layouts with efficient tables:

[wc_product_table
    columns="sku,name,stock,price,add_to_cart"
    show_quantity="true"
    category_filter="true"
]

This creates a quick-order interface:

Step 5: Role-Based Content

Show different pages/content to different customer types:

Wholesale-Only Pages

Create a "Wholesale Portal" page. Use Role Based Content Pro to restrict access to wholesale_customer role only.

Hide Retail Prices

For mixed sites, show retail customers regular shop. Wholesale customers get the product table.

Conditional Widgets

Show "Apply for Wholesale" in sidebar for retail customers. Show "Quick Order" for approved wholesale accounts.

Step 6: Payment Terms

B2B often requires invoicing rather than immediate payment:

Payment on Account

Create a "Pay by Invoice" payment gateway for approved accounts. Capture order, send invoice, track payment separately.

Minimum Order

// Minimum order for wholesale
add_action('woocommerce_check_cart_items', 'enforce_minimum');
function enforce_minimum() {
    if (current_user_can('wholesale_customer') && WC()->cart->total < 200) {
        wc_add_notice('Wholesale orders require $200 minimum', 'error');
    }
}

Net Terms

Invoice with Net 30 terms. Use accounting software (Xero, QuickBooks) for AR tracking.

Common B2B Features

Quick Reorder

Let customers reorder previous orders with one click. WooCommerce has this built in on the account page.

Quote Requests

For high-value orders, enable quote requests instead of immediate checkout. Review and respond with custom pricing.

Catalog Mode

Show products without prices or add-to-cart until approved. Use content restriction to hide ecommerce elements.

Build Your B2B Store

Product Table Pro and Role Based Content Pro provide the foundation for B2B WooCommerce without expensive suites. Quick ordering, role-based pricing visibility, content restriction.

Browse All Plugins

Summary

B2B WooCommerce needs different UX than retail. Product tables enable efficient ordering. Role-based access controls pricing visibility. Custom user roles separate customer types. Build it piece by piece rather than paying for monolithic B2B suites.

H

Haohunter

WordPress developer building lightweight plugins that solve real problems. No bloat, no subscriptions, just tools that work.