Extend B2B – Roles and Permissions

1. Introduction

↑ Back to top
This plugin provides a complete B2B company management system for WooCommerce. It allows store owners to create companies, assign users, manage roles and permissions, control purchasing workflows, and handle company-based payments and limits. The main goal of this plugin is to support organizations where multiple employees place orders, but purchases are controlled, approved, and tracked by managers or company owners.

1.1 Two-Level Management System

↑ Back to top

Store Owner (Admin)

The store owner (WooCommerce admin) has full control over everything:
  • Can create and manage companies
  • Can assign a Company Owner to each company
  • Can add or remove company credit
  • Can view all company activity, orders, and logs
  • Can control global plugin settings

Company Owner / Company Managers (Frontend Dashboard)

Each company has its own Company Owner (and optionally Managers). They do not need WordPress admin access. Instead, they get a Company Dashboard inside WooCommerce → My Account area, from where they can:
  • Add, edit, and remove company users
  • Create and manage internal company roles
  • Control permissions of each role
  • View all company orders
  • Review and approve shared carts
  • Manage purchase limits of employees
  • View company credit balance and logs
So in short:
  • Store Owner manages the system and companies
  • Company Owner manages only their own company from frontend

1.2 How It Works in Practice

↑ Back to top
  • The store owner creates a company and assigns a Company Owner
  • The Company Owner logs in and sees a new Company Dashboard in “My Account”
  • From this dashboard, the Company Owner can fully manage their organization without contacting the store admin
  • Employees only see what their role permissions allow them to see
This makes the system scalable, secure, and perfect for B2B and corporate customers.

Installation & Configuration

↑ Back to top
Installation

To install the plugin, go to Plugins > Add New in your WordPress dashboard. Click the Upload Plugin button at the top of the page. On the upload screen, select the plugin file you saved on your computer and upload it. Then click Install Now to begin the installation.

Once the installation is complete, you will see an Activate button. Click Activate to enable the plugin and start using it on your store.

Part A: Admin Backend Documentation

(Store Owner Guide)

This part of the documentation explains only the WordPress / WooCommerce admin backend.

2. Company Infrastructure (Backend)

↑ Back to top

2.1 Company Management

↑ Back to top
  • The plugin introduces a custom post type called Companies.
  • Admins can:
    • Create and manage companies.
    • Assign a Company Owner.
    • Configure all company-level settings (credit, limits, etc.).

2.2 Member Management

↑ Back to top
  • Users (customers) can be assigned to a company.
  • Each user can belong to only one company at a time.
  • Admin can:
    • Add or remove users from a company.

2.3 Company Dashboard (Admin View)

↑ Back to top
In the WordPress backend, admins can:
  • View all users of a company.
  • Manage company credit balance.
  • View credit logs and company activity.

3. Company Dashboard (Frontend)

↑ Back to top
The plugin adds a Company Dashboard inside the WooCommerce “My Account” area. Authorized users (Owner / Manager) can manage everything without backend access.

3.1 Available Tabs

↑ Back to top
  • View Users
  • Add / Edit Users
  • Manage Roles
  • View Company Orders
  • Shared Carts
  • Credit Logs
  • Purchase Limits
  • Personal Carts

4. Granular Roles and Permissions

↑ Back to top

4.1 Custom B2B Roles

↑ Back to top
Each company can define its own internal roles, for example:
  • Purchasing Agent
  • Accounting
  • Floor Manager
  • Manager
  • Viewer
These roles are separate from WordPress roles.

4.2 Permission Matrix

↑ Back to top
Each role can be configured with fine-grained permissions:

User / Role Management

  • Add or remove users
  • Create or edit company roles

Order Visibility

  • View only own orders
  • Or view all company orders

Checkout Control

  • Allow or block checkout
  • Some users can only browse or prepare carts

Cart Management

  • Share cart
  • View shared carts
  • Approve or reject shared carts

Financial Permissions

  • Use company credit
  • View credit logs

Manage Purchase

  • Manage user’s purchase limits

5. Shared Cart System (Approval Workflow)

↑ Back to top

5.1 Collaborative Shopping

↑ Back to top
  • Users with “Share Cart” permission can:
    • Add products to cart
    • Share the cart with the company instead of checking out

5.2 Approval Logic

↑ Back to top
  • Managers or Owners can:
    • View all shared carts
    • Modify cart items if needed
    • Approve or reject carts
  • Once a cart is approved:
    • It can be converted into an order
    • Only by users who have checkout permission

5.3 Use Case

↑ Back to top
This is ideal for companies where:
  • Employees select products
  • But a manager must approve the purchase before ordering

6. Company Credit (Digital Wallet)

↑ Back to top

6.1 Payment Method

↑ Back to top
  • The plugin adds a new payment method: Company Credit

6.2 Credit Balance

↑ Back to top
  • Each company has a credit balance
  • Store Owner can:
    • Add or subtract credit
    • Add notes (e.g., “Monthly Allowance”, “Bonus Credit”)
  • Company Owner can:
    • Allow which user’s can use company credits

6.3 Credit History

↑ Back to top
  • Every transaction is logged:
    • Who used the credit
    • Date and time
    • Order ID
    • Amount

7. Smart Purchase Limits

↑ Back to top

7.1 Spending Restrictions

↑ Back to top
  • Company Owner can:
    • Set individual purchase limits for each user

7.2 Renewal Periods

↑ Back to top
Limits can reset automatically:
  • Weekly
  • Monthly
  • Yearly

7.3 Automated Reset (CRON)

↑ Back to top
  • A built-in CRON system:
    • Automatically resets user limits
    • Based on the selected period

7.4 Real-time Validation

↑ Back to top
  • At checkout:
    • The system checks remaining allowance
    • If the order exceeds the limit, checkout is blocked

8. Communication & Tracking

↑ Back to top

8.1 Email Notifications

↑ Back to top
The plugin sends automatic emails when:
  • A user is added to a company
  • A user’s role or permissions change
  • Purchase limits are updated
  • A cart is shared
  • A cart is approved or rejected

9. Typical Workflow Example

↑ Back to top
  1. Admin creates a company
  2. Admin assigns a Company Owner
  3. Owner adds employees and assigns roles
  4. Employee creates a cart and shares it
  5. Manager reviews and approves the cart
  6. Authorized user places the order
  7. Payment is done using Company Credit or other methods
  8. All actions are logged and tracked


11. Conclusion

↑ Back to top
This plugin transforms WooCommerce into a full B2B company purchasing platform, suitable for wholesalers, corporate buyers, and organizations with structured purchasing workflows.

Plugin Support

Should you need any further assistance regarding this plugin, feel free to contact us at woosupport@codup.co and have our support team look into the issue for you. Thank you!

Related Products

Offer add-ons like gift wrapping, special messages or other special options for your products.

Add shipment tracking information to your orders.