WooCommerce B2B

Current version: 3.0.0



Introduction
Get started with WooCommerce B2B, the best seller WordPress plugin for your B2B needs.

WooCommerce B2B is a WordPress/WooCommerce extension that solves all the different challenges of a B2B shop, introducing many new features to manage your needs.

In a single suite, all the features that an e-commerce can require to open its horizons to wholesale, but without detracting from the classic B2C needs.

You can find an always updated version of this documentation here.

Requirements
Before starting, check that you have the minimum characteristics to ensure the correct functioning of WooCommerce B2B.

  • WordPress: version 5.0 or above
  • WooCommerce: version 4.0 or above
  • PHP: version 5.6 or above
Installation
There are multiple ways to install WooCommerce B2B, here is a quick step-by-step guide to do this.

Manual mode
  1. Unzip "woocommerce-b2b.zip" file
  2. Login in your FTP area
  3. Upload the entire "woocommerce-b2b" folder to the "/wp-content/plugins/" directory
  4. Login in your WordPress site
  5. Go to "Plugins > Installed Plugins" page
  6. Click "Activate" link at WooCommerce B2B
Classic WordPress mode
  1. Login to your WordPress Dashboard
  2. Go to "Plugins > Add New" page
  3. Click "Upload Plugin" button at the top
  4. Select "woocommerce-b2b.zip" file and click "Install now" button
  5. Once installed, click "Activate" link
Plugin options
WooCommerce B2B introduces a large number of features, here a complete list with description to guide you in the configuration.

Settings page
WooCommerce > Settings > B2B

Restricted catalog

Description

It limits the visibility of catalog only to customers who are logged in, redirecting guest users to the login page when they try to reach a WooCommerce page.

It also takes care of removing WooCommerce pages for guest customers from menus, widgets, lists.

Here hidden pages list:

  • Product pages
  • Product category pages
  • Product tag pages
  • Shop
  • Cart
  • Checkout
  • Pay page
  • Thanks page
  • Edit address page
  • View order page
  • Terms page
Customization

You can customize redirect by using dedicated hooks:

Hide prices

Description

Removes the possibility of viewing the prices of the products for non-logged in customers, replacing the price with the message "Please, login to see prices and buy" linked to the login page.

It also takes care of making the products not purchasable for customers who are not logged in, so no purchase can be made by guest customers.

Screenshots

  • Product page
  • Shop page
Prices rules

Description

Price rules allow you to offer your customers different prices depending on the group they belong to. For more flexibility, you can apply several options:

  1. Show prices assigned to single product: in each product, you can define a dedicated price (regular and sale) for each customer group. When a customer logs in, they will see the price dedicated to the group they belong to.
  2. Show default prices discounted by customer group percentage: you can define a discount percentage for each group that will be applied to all products. When a customer logs in, they will see the default WooCommerce price discounted by the percentage assigned to the group they belong to.
  3. Show prices assigned to single product discounted by customer group percentage: a combination of the previous options, the discount percentage will be applied no longer on the default price of WooCommerce, but on the dedicated price.
Note: if the dedicated price is not present for a product, the default WooCommerce price will be considered.
Examples

Here are some simulated scenarios, to understand how the price rules are applied in the different combinations.

  • Groups:
    • Partners, with 15% discount
    • Suppliers, without percentage discount
    • Resellers, with 10% discount
  • Customers:
    • Customer1, assigned to Partners group
    • Customer2, assigned to Suppliers group
    • Customer3, assigned to Resellers group
    • Customer4, no group
  • Products:
    • Product1
      • Default price 100
      • Partners dedicated price 90
      • Suppliers dedicated price 80
      • Resellers dedicated price 70
    • Product2
      • Default price 200
      • No Partners dedicated price
      • Suppliers dedicated price 180
      • Resellers dedicated price 170
    • Product3
      • Default price 300
      • No Partners dedicated price
      • No Suppliers dedicated price
      • Resellers dedicated price 270
Option1 Option2 Option3
Customer1
(Partners)
Product1 90
(Partners dedicated price)
85
(Default price - 15%)
76,5
(Partners dedicated price - 15%)
Product2 200
(no Partners dedicated price => default price)
170
(Default price - 15%)
170
(no Partners dedicated price => default price - 15%)
Product3 300
(no Partners dedicated price => default price)
255
(Default price - 15%)
255
(no Partners dedicated price => default price - 15%)
Customer2
(Suppliers)
Product1 80
(Suppliers dedicated price)
100
(Default price - 0%)
80
(Suppliers dedicated price - 0%)
Product2 180
(Suppliers dedicated price)
200
(Default price - 0%)
180
(Suppliers dedicated price - 0%)
Product3 300
(no Partners dedicated price => default price)
300
(Default price - 0%)
300
(no Suppliers dedicated price => default price - 0%)
Customer3
(Resellers)
Product1 70
(Resellers dedicated price)
90
(Default price - 10%)
63
(Resellers dedicated price - 10%)
Product2 170
(Resellers dedicated price)
180
(Default price - 10%)
153
(Resellers dedicated price - 10%)
Product3 270
(Resellers dedicated price)
270
(Default price - 10%)
243
(Resellers dedicated price - 10%)
Customer4
(no group)
Product1 100
(Default price)
100
(Default price)
100
(Default price)
Product2 200
(Default price)
200
(Default price)
200
(Default price)
Product3 300
(Default price)
300
(Default price)
300
(Default price)
Note: WooCommerce B2B provide by default a GUEST group. Guest group dedicated prices will be applied to guest customers or to customers without a group, instead of WooCommerce default prices. WooCommerce default prices are used only as fallback (if dedicated price is missing, or as base to calculate percentage discount when "Show default prices discounted by customer group percentage" is enabled.
Show discount

Description

Allow customers to see their group assigned percentage discount. There are two different options, independent of each other:

  • Customers can view discount amount assigned to them in their own account area: display group percentage discount in customer my-account area
  • Customers can view discount amount assigned to them in single product page: display group percentage discount in each product page
Note: it requires "Price rules" option in WooCommerce B2B settings page is set on "Show default prices discounted by customer group percentage" or "Show prices assigned to single product discounted by customer group percentage".
Customization

You can customize redirect by using dedicated hooks:

Screenshots

  • Product page
  • My account page
Product prices with and without taxes

Description

Displays the prices including taxes for B2C customers (Guest) and taxes excluded for B2B customers (assigned to other groups).

  • Customers can view discount amount assigned to them in their own account area: display group percentage discount in customer my-account area
  • Customers can view discount amount assigned to them in single product page: display group percentage discount in each product page
Note: it requires "Enable taxes" option in WooCommerce settings page (general tab) is enable. It requires "Tax rates" option in WooCommerce settings page (Tax tab) is setup. When enabled, override options "Display prices in the shop" and "Display prices during cart and checkout" behaviour in "Tax" tab under WooCommerce settings.
Screenshots

  • Product page
Product categories visibility

Description

Enable product categories management. You can decide to view the product categories according to the customer group. If a category is hidden, the products belonging to the category will also be hidden.

Hidden product categories and their products are also removed from menus, widgets and lists.

Screenshots

  • Shop page
Redirect on page

Description

When customers reach not visible product category or product, they will be redirected on 404 pages or on a WordPress page of your choice.

Vat number

Description

Multiple options to enable VAT management:

  • Add VAT number field to billing address: VAT number field is added to billing address (in checkout form and in customer profile page), order emails, order details and registration form (if "REGISTRATION FORM" option enabled), both in the frontend and in the backend.
  • Make VAT number field required: decide if the VAT number field must be mandatory or optional.
  • Enable VAT number VIES validation for EU customers: enable VAT number VIES validation for EU customers. VIES validation works with third part WebService. VIES validation requires PHP SOAP extension, please check it is available on your server (contact your server provider to know more).
Customization

You can customize redirect by using dedicated hooks:

Screenshots

  • Checkout page
  • VIES validation
  • Admin order details
  • Admin customer page
Min purchase amount

Description

Allow to set a minimum purchase amount by group. If the minimum amount is not reached, a warning message is displayed in checkout page.

There are two different options, independent of each other:

  • Enable minimum purchase amount by group: enable minimum purchase amount by group management
  • Display a message in the shopping cart page to alert that minimum amount isn't reached yet: if the minimum amount is not reached, a warning message is displayed in the cart.
  • Remove "Proceed to checkout" button in shopping cart if customer doesn't reach the minimum amount: if the minimum amount is not reached, customer cannot proceed to checkout page.
Screenshots

  • Cart page
  • Checkout page
Enable quotations

Description

When enabled, "Quotation request" appears as new payment method.

In the customer's my-account area, a special "Quotations" section is displayed, listing all of his requests for quotation.

If the customer chooses "Quotation request", he receives an email summarizing his request and the order is saved with the status "On quote".

The admin of the site can manage the request, modifying the quotation just like any other order and finally conclude by putting the status "Quoted". In this way, the customer receives an email notification that the quote is ready and can decide to make the payment by clicking the "Pay" button directly from his my-account area. In this way, the quotation becomes an order and can be managed as such.

Note: on new quotation request, products stock is not reduced. Stock reduction is done on "Quoted" status. Note: quotations email can be customized in WooCommerce settings page (Emails tab). Note: quotations payment method text can be customized in WooCommerce settings page (Payments tab).
Screenshots

  • Checkout page
  • My-account page (list)
  • My-account page
    (quotation details)
  • On quote email
  • Quoted email
  • Admin new quote email
  • Quotation email
    customization
  • Quotation payment
    method customization
Quotation endpoint

Description

Allow to change my-account page quotations list endpoint slug.

Moderate registration

Description

When enabled, customers can login only after admin approvation. On approvation, customer receive an email notification which warns that your account is active.

Note: active account email can be customized in WooCommerce settings page (Emails tab).
Screenshots

  • Registration page
  • Active account email
  • New account email
  • Active account
    email customization
  • Admin customer page
Registration form

Description

Extend WooCommerce default registration form with WooCommerce default billing fields.

Note: it requires "Allow customers to create an account on the 'My account' page" option in WooCommerce settings page (Accounts & Privacy tab) is enabled.
Customization

You can customize redirect by using dedicated hooks:

Screenshots

  • Registration page
Registration notice

Description

Send email to admin on every new customer account registration. Very useful if moderate registration option is enabled.

Customization

You can customize redirect by using dedicated hooks:

Default group

Description

Assign automatically customer to a group on registration.


Group page
Users > All Groups > {Group}

Disable payment methods for this group

Description

Select all payment methods you want to disable for customers assigned to group.

Screenshots

  • Admin group page
Disable shipping methods for this group

Description

Select all shipping methods you want to disable for customers assigned to group.

Screenshots

  • Admin group page
Terms and Conditions for this group

Description

Enter a dedicated Terms&Condition disclaimer to display to customers assigned to group.

To use dedicated Terms&Conditions, you can use the shortcode [wcb2bgrouptermsconditions]; in this way, you can also integrate in default global Terms&Conditions text.

Customization

You can customize redirect by using dedicated hooks:

Screenshots

  • Admin group page
Percentage discount

Description

As described in "Price rules" option, each group can have a global percentage discount to apply to all product. You can enter desired percentage discount.

Note: it requires "Price rules" option in WooCommerce B2B settings page is set on "Show default prices discounted by customer group percentage" or "Show prices assigned to single product discounted by customer group percentage".
Screenshots

  • Admin group page
Packaging fee

Description

Packaging fee is added to customer cart, as additional fee to process order.

It can be set as fixed amount or percentage on cart amount.

Screenshots

  • Admin group page
  • Checkout page
Min purchase amount

Description

The minimum amount of the cart to be able to complete the order. If the customer does not reach the minimum cart amount, he cannot complete his purchase.

Note: it requires "Min purchase amount" option in WooCommerce B2B settings page is enabled.
Screenshots

  • Admin group page
  • Cart page
  • Checkout page
Tax exemption

Description

Allow customers assigned to group to purchase without taxes (zero tax class).

Note: it requires "Enable taxes" option in WooCommerce settings page (general tab) is enable. It requires "Tax rates" option in WooCommerce settings page (Tax tab) is setup.
Screenshots

  • Admin group page

Product page
Products > All Products > {Product}

Product dedicated and tier prices

Description

Set for each product custom price lists according to customer group.

For each group created, there is an additional section: {GROUP_NAME} GROUP PRICES

In this section, it's possible to enter:

  • Regular price: dedicated regular price for group
  • Sale price: dedicated sale price for group

In addition, in this section it is possible to enter the discounted prices for each group (tier group prices): by clicking on the "Add tier price" button, a new row is inserted, in which it is sufficient to enter:

  • Min quantity minimum quantity to which the discounted price applies
  • Final discounted price the discounted price applied for the max quantity
Examples

Here are some simulated scenarios, to understand how the tier group prices are applied in the different combinations.

  • Product configuration
    • Min quantity: 5 - Final discounted price: 100
    • Min quantity: 10 - Final discounted price: 90
    • Min quantity: 15 - Final discounted price: 80
    • Min quantity: 20 - Final discounted price: 70
  • If customer add to cart quantity 5, he pay 100 for each
  • If customer add to cart quantity 6, he pay 10 for each
  • If customer add to cart quantity 12, he pay 90 for each
  • If customer add to cart quantity 20, he pay 70 for each
  • If customer add to cart quantity 99, he pay 70 for each
Screenshots

  • Admin product page
    (simple)
  • Admin product page
    (variable)
  • Product page
Package quantity

Description

Force customers to purchase product by pack increment. Insert how much products are in every pack.

This setting is applied on each product quantity selector in shop (product pages, category pages, cart)

In product page, a message appears to inform you that the product can only be purchased in predefined stocks.

Customization

You can customize redirect by using dedicated hooks:

Screenshots

  • Admin product page
  • Product page
Minimum quantity

Description

Force customers to purchase minimum quantity of a product.

This setting is applied on each product quantity selector in shop (product pages, category pages, cart)

In product page, a message appears to inform you that the product can only be purchased in minimum quantity.

Customization

You can customize redirect by using dedicated hooks:

Screenshots

  • Admin product page
  • Product page

Product category page
Products > Categories > {Category}

Group access

Description

Manage product category visibility by group.

Screenshots

  • Admin product
    category page

Customer page
Users > All Users > {User}

User group

Description

Assign a group to customer.

Screenshots

  • Admin user page
User status

Description

Enable/Disable user profile. If status is "Inactive", customer cannot login and purchase.

Note: it requires "Moderate registration" option in WooCommerce B2B settings page is enabled.
Screenshots

  • Admin user page

Import/Export tools
Products > All Products

Product Import/Export tools

Description

Bulk update B2B product informations. WooCommerce B2B extends default WooCommerce Import/Export tools to allow to fast manage its custom data.

Here a list of product fields managed by WooCommerce B2B you can bulk manage in Import/Export tools:

  • Minimum quantity
  • Increment quantity
  • Groups dedicated prices
  • Groups tier prices

Tier group prices are formatted with a particular pattern. Each tier group price is identified by the couple quantity-price, separed by colon (:). Multiple tier group prices are separated by pipe (|). For example:

10:190|20:180

means that up to 10 quantity product price is 190, up to 20 quantity product price is 180 and so on.

You can add all tier group prices you prefer.

Note: to know more about WooCommerce Import/Export tools, please read Official documentation.
Screenshots

  • Admin products page
  • Import page

WordPress Export tools
Tools > Export

Customers export

Description

Allow to export customers list in CSV file to statistics purposes.

Screenshots

  • Admin export tools page
How to translate
Translate WooCommerce B2B is very simple.

WooCommerce B2B is already provided in two language: English and Italian.

All plugin strings have been localized using the GNU gettex framework to make it completely "translation ready", so it can be easly translated in the same way that other WordPress plugins.

This is a simple guide to translate WooCommerce B2B in the language of your choice.


Get a useful software: POEDIT

WordPress, with all its themes and plugins, based translations on GNU gettex framework, that use three types of files:

  • PO (Portable Object) files
  • MO (Machine Object) files
  • POT (Portable Object Template) files

The first step is to get a translation tool able to manage this kind of files; there are many ones available, but I suggest without doubt Poedit.

Poedit is a free open source software, easy to use and available for MacOSX, Windows, Linux and you can download it from here: https://poedit.net/download.


Translating with POEDIT

Create a new translation with Poedit is very simple, here a step-by-step guide to help you to make it.

  1. Install Poedit
  2. Open Poedit and go to:
    File -> New from POT/PO file
  3. In the popup box that appears, navigate into WooCommerce B2B folder and select the file:
    woocommerce-b2b/i18n/woocommerce-b2b.pot
  4. When the file is loaded, another box will pop up asking for the language you want to translate:
    Choose your language
  5. String by string, enter your translation in the Translate box at bottom.

When finished, validate your translation and save the file, named as: woocommerce-b2b-it_IT. The name pattern is composed by:

  • woocommerce-b2b: the plugin domain name, usually the plugin folder name (as described in WordPress i18n standards)
  • it: the GNU language code
  • IT: the GNU country code

Use your translation

After saving, Poedit will create two files:

  • woocommerce-b2b-it_IT.po
  • woocommerce-b2b-it_IT.mo

Your translations are ready! To use them, you just have to move them into the folder:

  • wp-content/languages/plugins/

Now, go to your website and WooCommerce B2B is finally translated in your language!


More informations

For more informations about language and country codes, please refer to:

For more informations about GNU gettex utilities and WordPress i18n, please refer to:

Note: if you want to contribute to WooCommerce B2B internationalization, please send your PO file to: support@woocommerce-b2b.com.
Plugin Hooks
WooCommerce B2B provide large number of hooks to allow developers to extends or customize default behaviour.

If you are a developer, WooCommerce B2B give you many possible customizations by using the hooks. To know more about WordPress hooks working, please read Plugin API/Hooks WordPress Codex.

Here the list of WooCommerce B2B hooks:

Custom roles management

Description

WooCommerce B2B apply some own rules and functions only to default WooCommerce customer role. With this hook, you can extend these functions behaviour to custom roles.

Definition
apply_filters( 'wcb2b_has_role_customer', array $roles );
Defaults
$roles = array( 'customer' );
Example

To extend WooCommerce B2B functions to a new custom role called "mycustomrole", you can add this code to your functions.php file:

add_filter( 'wcb2b_has_role_customer', 'fn_wcb2b_has_role_customer' );
function fn_wcb2b_has_role_customer( $roles ) {
    $roles[] = 'mycustomrole';
    return $roles;
}
Redirect on resticted catalog page access

Description

Customize redirect when a customer try to access to a restricted page in your website.

Note: it requires "Restricted catalog" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_restricted_catalog_redirect', string $url );
Defaults
// My account page
$url = get_permalink( get_option( 'woocommerce_myaccount_page_id' ) );
Example

To change redirect to a custom page (with ID 123), you can add this code to your functions.php file:

add_filter( 'wcb2b_restricted_catalog_redirect', 'fn_wcb2b_restricted_catalog_redirect' );
function fn_wcb2b_restricted_catalog_redirect( $url ) {
    return get_the_permalink( 123 );
}
Display login message on hidden prices

Description

Display message to invite to login instead of add-to-cart button, both in archive pages and product page.

Note: it requires "Hide prices" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_display_login_message', bool $display );
Defaults
$display = true;
Example

To remove login message, you can add this code to your functions.php file:

add_filter( 'wcb2b_display_login_message', 'fn_wcb2b_display_login_message' );
function fn_wcb2b_display_login_message( $display ) {
    return false;
}

Or, alternatively:

add_filter( 'wcb2b_display_login_message', '__return_false' );
Login message text on hidden prices

Description

Customize the login message text that replace add-to-cart buttons.

Note: it requires "Hide prices" option in WooCommerce B2B settings page is enabled and "wcb2b_display_login_message" hook filter is "true".
Definition
apply_filters( 'wcb2b_login_message', string $message );
Defaults
$message = __( 'Please, login to see prices and buy', 'woocommerce-b2b' );
Example

To change login message, you can add this code to your functions.php file:

add_filter( 'wcb2b_login_message', 'fn_wcb2b_login_message' );
function fn_wcb2b_login_message( $message ) {
    return __( 'Want to see prices? Please login!', 'woocommerce-b2b' );
}
Login message URL on hidden prices

Description

Customize the login message permalink that replace add-to-cart buttons.

Note: it requires "Hide prices" option in WooCommerce B2B settings page is enabled and "wcb2b_display_login_message" hook filter is "true".
Definition
apply_filters( 'wcb2b_login_message_url', string $url );
Defaults
// My account page
$url = get_permalink( get_option( 'woocommerce_myaccount_page_id' ) );
Example

To change login message permalink and redirect to a custom page (with ID 123), you can add this code to your functions.php file:

add_filter( 'wcb2b_login_message_url', 'fn_wcb2b_login_message_url' );
function fn_wcb2b_login_message_url( $url ) {
    return get_the_permalink( 123 );
}
Display quantity messages on product page

Description

Display message to inform about product minimum quantity and minimum increment purchase in product page.

Definition
apply_filters( 'wcb2b_display_quantity_message', bool $display );
Defaults
$display = true;
Example

To remove quantity message, you can add this code to your functions.php file:

add_filter( 'wcb2b_display_quantity_message', 'fn_wcb2b_display_quantity_message' );
function fn_wcb2b_display_quantity_message( $display ) {
    return false;
}

Or, alternatively:

add_filter( 'wcb2b_display_quantity_message', '__return_false' );
Product minimum quantity message text

Description

Customize the minimum quantity message text exception.

Definition
apply_filters( 'wcb2b_minimum_message', string $message, int $quantity );
Defaults
// $quantity contain the minimum quantity set for product
$message = sprintf( __( 'You must purchase at least %s of this product', 'woocommerce-b2b' ), $quantity );
Example

To change minimum quantity message, you can add this code to your functions.php file:

add_filter( 'wcb2b_minimum_message', 'fn_wcb2b_minimum_message', 10, 2 );
function fn_wcb2b_minimum_message( $message, $quantity ) {
    return sprintf(
        __( 'To complete purchase, please add at least %s of this product', 'woocommerce-b2b' ),
        $quantity
    );
}
Product increment quantity message text

Description

Customize the minimum increment quantity purchase message text exception.

Definition
apply_filters( 'wcb2b_increment_message', string $message, int $quantity );
Defaults
// $quantity contain the minimum increment quantity set for product
$message = sprintf( __( 'This product can be purchased by increments of %s', 'woocommerce-b2b' ), $quantity );
Example

To change minimum increment quantity message, you can add this code to your functions.php file:

add_filter( 'wcb2b_increment_message', 'fn_wcb2b_increment_message', 10, 2 );
function fn_wcb2b_increment_message( $message, $quantity ) {
    return sprintf(
        __( 'This product can be purchase by packaging of %s', 'woocommerce-b2b' ),
        $quantity
    );
}
Percentage discount message text

Description

Customize message displayed in customer account page or in product page to display discount amount assigned to customer.

Note: it requires "Show discount" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_discount_message', string $message, decimal $discount );
Defaults
// $discount contain the percentage discount set to group
$message = sprintf( __( 'Discount amount assigned to you: %s%%', 'woocommerce-b2b' ), $discount );
Example

To change discount message, you can add this code to your functions.php file:

add_filter( 'wcb2b_discount_message', 'fn_wcb2b_discount_message', 10, 2 );
function fn_wcb2b_discount_message( $message, $discount ) {
    return sprintf(
        __( 'Discount: %s', 'woocommerce-b2b' ),
        $discount
    );
}
Minimum cart amount message text

Description

Change the alert message displayed in cart and/or checkout page when the minimum cart amount isn't reached.

Note: it requires "Min purchase amount" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_display_min_purchase_cart_message', string $message, decimal $price_raw, string $price );
apply_filters( 'wcb2b_display_min_purchase_checkout_message', string $message, decimal $price_raw, string $price );
Defaults
// $price contain the minimum amount set in WooCommerce B2B settings to be able to purchase
$message = sprintf( __( 'To proceed to checkout and complete your purchase, make sure you have reached the minimum amount of %s.', 'woocommerce-b2b' ), $price );
// $price contain the minimum amount set in WooCommerce B2B settings to be able to purchase
$message = sprintf( __( 'To proceed to checkout and complete your purchase, you must reach the minimum amount of %s, but your total cart amount is currently %s. Return to %sshop%s', 'woocommerce-b2b' ), $min_price, wc_price( WC()->cart->cart_contents_total ), '', '' );
Example

To customize the alert message in cart page, you can add this code to your functions.php file:

add_filter( 'wcb2b_display_min_purchase_cart_message', 'fn_wcb2b_display_min_purchase_cart_message', 10, 3 );
function fn_wcb2b_display_min_purchase_cart_message( $message, $amount_raw, $amount ) {
    return sprintf(
        __( 'Sorry, you haven\'t reached the minimum amount to purchase (%s)', 'woocommerce-b2b' ),
        $amount
    );
}

To customize the alert message in chechout page:

add_filter( 'wcb2b_display_min_purchase_checkout_message', 'fn_wcb2b_display_min_purchase_checkout_message', 10, 3 );
function fn_wcb2b_display_min_purchase_checkout_message( $message, $amount_raw, $amount ) {
    return sprintf(
        __( 'Sorry, you haven\'t reached the minimum amount to purchase (%s)', 'woocommerce-b2b' ),
        $amount
    );
}

In both functions, $amount_raw is the numeric amount, while $amount is the formatted one with currency.

Send customer account activation email

Description

Send an email notification to customer when his account is activated.

Note: it requires "Moderate registration" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_send_activation_notification', bool $send );
Defaults
$send = true;
Example

To don't send any email notification to customer when his account his active, you can add this code to your functions.php file:

add_filter( 'wcb2b_send_activation_notification', 'fn_wcb2b_send_activation_notification' );
function fn_wcb2b_send_activation_notification( $send ) {
    return false;
}

Or, alternatively:

add_filter( 'wcb2b_send_activation_notification', '__return_false' );
Customer new account email B2B text

Description

Customize message displayed in new account email notification with B2B instructions.

Note: it requires "Moderate registration" option in WooCommerce B2B settings page is enabled and "wcb2b_send_activation_notification" hook filter is "true".
Definition
apply_filters( 'wcb2b_new_account_email', string $message );
Defaults
$message = __( 'We are checking your account, please wait for the activation confirmation email before trying to login', 'woocommerce-b2b' );
Example

To change message text in new account email, you can add this code to your functions.php file:

add_filter( 'wcb2b_new_account_email', 'fn_wcb2b_new_account_email' );
function fn_wcb2b_new_account_email( $message ) {
    return __( 'Your account is approving, we will send you a confirmation email and you can login', 'woocommerce-b2b' );
}
Wait for approvation message in registration page

Description

Customize message displayed when an user register a new account and his account is waiting for moderation.

Note: it requires "Moderate registration" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_waiting_approvation', string $message );
Defaults
$message = __( 'Your account is now under review. You will receive an email as soon as it is activated.', 'woocommerce-b2b' );
Example

To change message text displayed when a customer register, you can add this code to your functions.php file:

add_filter( 'wcb2b_waiting_approvation', 'fn_wcb2b_waiting_approvation' );
function fn_wcb2b_waiting_approvation( $message ) {
    return __( 'Please wait for account activation email to login.', 'woocommerce-b2b' );
}
Customer statuses

Description

Customize customer status to improve account moderation management.

Note: it requires "Moderate registration" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_customer_statuses', array $statuses );
Defaults
$statuses = array(
    0 => esc_html__( 'Inactive', 'woocommerce-b2b' ),
    1 => esc_html__( 'Active', 'woocommerce-b2b' )
);
Example

To add a custom status, you can add this code to your functions.php file:

add_filter( 'wcb2b_customer_statuses', 'fn_wcb2b_customer_statuses' );
function fn_wcb2b_customer_statuses( $statuses ) {
    $statuses[3] = esc_html__( 'Pending', 'woocommerce-b2b' );
    return $statuses;
}
Customize registration form fields

Description

Customize registration form fields.

Note: it requires "Registration form" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_register_form_fields', array $fields );
Example

To make company field not required in extended registration form, you can add this code to your functions.php file:

add_filter( 'wcb2b_register_form_fields', 'fn_wcb2b_register_form_fields' );
function fn_wcb2b_register_form_fields( $fields ) {
    $fields['billing_company']['required'] = false;
    return $fields;
}

To remove phone field in extended registration form, you can add this code to your functions.php file:

add_filter( 'wcb2b_register_form_fields', 'fn_wcb2b_register_form_fields' );
function fn_wcb2b_register_form_fields( $fields ) {
    unset( $fields['billing_phone'] );
    return $fields;
}
Customize VIES validation country list

Description

Customize countries considered in EU area for which the VIES validation is carried out.

Note: it requires "Enable VAT number VIES validation for EU customers" option in WooCommerce B2B settings page is enabled.
Definition
apply_filters( 'wcb2b_vies_countries', array $countries );
Example

To customize EU country list, you can add this code to your functions.php file:

add_filter( 'wcb2b_vies_countries', 'fn_wcb2b_vies_countries' );
function fn_wcb2b_vies_countries( $countries ) {
    // Remove United Kingdom from country list
    unset( $countries['GB'] );
    return $countries;
}

Here the list of countries currently supported:

  • AT - Austria
  • BE - Belgium
  • BG - Bulgaria
  • CY - Cyprus
  • CZ - Czech Republic
  • DE - Germany
  • DK - Denmark
  • EE - Estonia
  • GR - Greece
  • ES - Spain
  • FI - Finland
  • FR - France
  • GB - United Kingdom
  • HR - Croatia
  • HU - Hungary
  • IE - Ireland
  • IT - Italy
  • LT - Lithuania
  • LU - Luxembourg
  • LV - Latvia
  • MT - Malta
  • NL - The Netherlands
  • PL - Poland
  • PT - Portugal
  • RO - Romania
  • SE - Sweden
  • SI - Slovenia
  • SK - Slovakia

To know more about supported EU member countries, please refer to: VIES VAT number validation.

To manage countries, you need to use their ISO codes (3166-1 alpha-2 version). To know more about ISO codes, please read: Two-letter country codes.


Since v2.1.6, WooCommerce B2B introduced transcoding capabilitites to prevent discrepancies between the country code provided by WooCommerce and the country code required by VIES. For example, for Greece, the country code used by WooCommerce is "GR", while the country code requested by VIES is "EL". The $countries parameter therefore has the format {WooCommerceCountryCode} => {ViesCountryCode} (ie: 'GR' => 'EL').

Admin display order weight

Description

Display the order total weight in order details.

Definition
apply_filters( 'wcb2b_display_order_weight', bool $display );
Defaults
$display = true;
Example

To prevent weight to show in admin order details, you can add this code to your functions.php file:

add_filter( 'wcb2b_display_order_weight', 'fn_wcb2b_display_order_weight' );
function fn_wcb2b_display_order_weight( $display ) {
    return false;
}

Or, alternatively:

add_filter( 'wcb2b_display_order_weight', '__return_false' );
Admin users filters dropdown

Description

Customize filters in users list page in admin.

Definition
apply_filters( 'wcb2b_users_extra_tablenav', string $filters );
Example

To add user filter, you can add this code to your functions.php file:

add_filter( 'wcb2b_users_extra_tablenav', 'fn_wcb2b_users_extra_tablenav' );
function fn_wcb2b_users_extra_tablenav( $filters ) {
    $filters += '<select name="custom" id="filter">
                    <option value="option1">Option 1</option>
                </select>';
    return $filters;
}

NB: remember to add your custom rules to filter users by using the default WordPress hook:

add_filter( 'pre_get_users', WP_User_Query $query );

To know more, please read: WordPress Code Reference.

Admin groups Terms&Conditions editor settings

Description

Customize editor settings in group page in Terms&Conditions box.

Definition
apply_filters( 'wcb2b_group_terms_conditions_editor', array $settings );
Defaults
$settings = array(
    'toolbar1'      => 'bold,italic,underline,separator,alignleft,aligncenter,alignright,separator,link,unlink,undo,redo',
    'toolbar2'      => '',
    'toolbar3'      => '',
);
Example

To remove the capability to add link, you can add this code to your functions.php file:

add_filter( 'wcb2b_group_terms_conditions_editor', 'fn_wcb2b_group_terms_conditions_editor' );
function fn_wcb2b_group_terms_conditions_editor( $settings ) {
    $settings['toolbar1'] = 'bold,italic,underline,separator,alignleft,aligncenter,alignright,separator,undo,redo';
    return $settings;
}

To know more, please read: WordPress Code Reference.

Settings extra fields

Description

Change, add or delete extra fields or WooCommerce B2B settings in admin.

Definition
apply_filters( 'wcb2b_general_settings', array $settings );
Example

To add your custom setting, you can add this code to your functions.php file:

add_filter( 'wcb2b_general_settings', 'fn_wcb2b_general_settings' );
function fn_wcb2b_general_settings( $settings ) {
    $settings += array(
        'section_title-wcb2b_custom_section' => array(
            'name'     => __( 'Custom option section title', 'woocommerce-b2b' ),
            'type'     => 'title',
            'desc'     => __( 'Custom option section description', 'woocommerce-b2b' )
        ),
        'option-wcb2b_custom' => array(
            'name' => __( 'Custom option', 'woocommerce-b2b' ),
            'type' => 'text',
            'desc' => __( 'Custom option description', 'woocommerce-b2b' ),
            'id'   => 'custom'
        ),
        'section_end-wcb2b_custom_section' => array(
             'type' => 'sectionend'
        )
    );
    return $settings;
}
WooCommerce B2B before init

Description

Triggered when WordPress initialises.

Definition
do_action( 'wcb2b_before_init' );
Example

To add a new callback, you can add this code to your functions.php file:

add_action( 'wcb2b_before_init', 'fn_wcb2b_before_init' );
function fn_wcb2b_before_init() {
    // Make action magic happen here...
}
WooCommerce B2B init

Description

Triggered after plugin has initialized.

Definition
do_action( 'wcb2b_init' );
Example

To add a new callback, you can add this code to your functions.php file:

add_action( 'wcb2b_init', 'fn_wcb2b_init' );
function fn_wcb2b_init() {
    // Make action magic happen here...
}
WooCommerce B2B loaded

Description

Triggered when plugin has loaded.

Definition
do_action( 'wcb2b_loaded' );
Example

To add a new callback, you can add this code to your functions.php file:

add_action( 'wcb2b_iwcb2b_loadednit', 'fn_wcb2b_loaded' );
function fn_wcb2b_loaded() {
    // Make action magic happen here...
}
REST API support
Manage WooCommerce B2B data with extended REST API.

Groups API

Description

This API lets you retrieve and view all groups or a specific group by ID.

WooCommerce B2B available meta fields:

  • wcb2b_group_discount: contains global percentage discount assigned to group
    Value is a floating number
    In API GET response, has also a dedicated field alias named "wcb2b_group_discount_percentage"
  • wcb2b_group_min_purchase_amount: contains minimum purchase amount to purchase
    Value is a floating number
    In API GET response, has also a dedicated field alias named "wcb2b_group_min_purchase_amount"
  • wcb2b_group_packaging_fee: contains packaging fee.
    Value is an associative array with:
    • type: type of fee. Can be "amount" or "percent"
    • value: fee to apply. It's a floating number

    In API GET response, has also a dedicated field alias named "wcb2b_group_packaging_fee"
  • wcb2b_group_terms_conditions: contains dedicated Terms and Conditions text
    Value is a text (can include HTML)
    In API GET response, has also a dedicated field alias named "wcb2b_group_terms_conditions"
  • wcb2b_group_shippings: contains shipping methods disabled
    Value is a simple array with all shipping methods slugs to disable
    In API GET response, has also a dedicated field alias named "wcb2b_group_disabled_shippings"
  • wcb2b_group_gateways: contains payment methods disabled
    Value is a simple array with all payment methods slugs to disable
    In API GET response, has also a dedicated field alias named "wcb2b_group_disabled_gateways"

Note: WooCommerce B2B extends default WordPress posts REST API with own custom meta fields. For more informations, please visit: WordPress Official documentation


HTTP request (all groups)
get
/wp-json/wc/v3/groups

Available parameters
int|string $author Author ID, or comma-separated list of IDs
string $author_name User 'user_nicename'
array $author__in An array of author IDs to query from
array $author__not_in An array of author IDs not to query from
array $date_query An associative array of WP_Date_Query arguments. See WP_Date_Query::__construct()
bool $exact Whether to search by exact keyword. Default false
array $meta_query An associative array of WP_Meta_Query arguments. See WP_Meta_Query
int $menu_order The menu order of the posts
string $name Post slug
bool $nopaging Show all posts (true) or paginate (false). Default false
bool $no_found_rows Whether to skip counting the total rows found. Enabling can improve performance. Default false
int $offset The number of posts to offset before retrieval
string $order Designates ascending or descending order of posts. Default 'DESC'. Accepts 'ASC', 'DESC'
string|array $orderby Sort retrieved posts by parameter
int $page Show the number of posts that would show up on page X of a static front page
int $paged The number of the current page
string $pagename Page slug
string $perm Show posts if user has the appropriate capability
array $post__in An array of post IDs to retrieve, sticky posts will be included
array $post__not_in An array of post IDs not to retrieve. Note: a string of comma-separated IDs will NOT work
string|array $post_status A post status (string) or array of post statuses
int $posts_per_page The number of posts to query for. Use -1 to request all posts
array $post_name__in An array of post slugs that results must match
string $s Search keyword(s). Prepending a term with a hyphen will exclude posts matching that term
string $title Post title

Note: This parameters are WordPress WP_Query defaults. For more informations, please visit: WordPress Official documentation


HTTP request (single group)
get
/wp-json/wc/v3/groups/{ID}

Example response
{
    "ID": 273,
    "post_author": "1",
    "post_date": "2020-06-13 00:00:00",
    "post_date_gmt": "2020-06-13 00:00:00",
    "post_content": "",
    "post_title": "Partners",
    "post_excerpt": "",
    "post_status": "publish",
    "comment_status": "closed",
    "ping_status": "closed",
    "post_password": "",
    "post_name": "partners",
    "to_ping": "",
    "pinged": "",
    "post_modified": "2020-06-13 00:00:00",
    "post_modified_gmt": "2020-06-13 00:00:00",
    "post_content_filtered": "",
    "post_parent": 0,
    "guid": "https://demo.woocommerce-b2b.com/wcb2b_group/partners/",
    "menu_order": 0,
    "post_type": "wcb2b_group",
    "post_mime_type": "",
    "comment_count": "0",
    "filter": "raw",
    "wcb2b_group_discount_percentage": "10",
    "wcb2b_group_min_purchase_amount": "500",
    "wcb2b_group_packaging_fee": {
        "type": "percent",
        "value": "3"
    },
    "wcb2b_group_terms_conditions": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
    "wcb2b_group_disabled_shippings": [
        "flat_rate"
    ],
    "wcb2b_group_disabled_gateways": [
        "bacs",
        "cheque"
    ]
}
HTTP request (create group)
post
/wp-json/wc/v3/groups/

Example data
{"name": "Partners", wcb2b_group_discount":15}
                                    

HTTP request (update group)
put
/wp-json/wc/v3/groups/{ID}

Example data
{"wcb2b_group_discount":15}
                                    

HTTP request (delete group)
delete
/wp-json/wc/v3/groups/{ID}
Product API

Description

This API lets you retrieve and view all products or a specific product by ID.

WooCommerce B2B available meta fields:

  • wcb2b_product_group_prices: contains dedicated prices by group.
    Value is a multidimensional array with GROUP ID as key and associative subarray:
    • regular_price: dedicated group regular price. It's a floating number
    • sale_price: dedicated group sale price. It's a floating number

    In API GET response, has also a dedicated field alias named "wcb2b_group_prices"
  • wcb2b_product_group_tier_prices: contains tiered prices by group.
    Value is a multidimensional array with GROUP ID as key and associative subarray:
    • {QUANTITY}: minimum quantity to apply tier price. It's an integer number
    • {PRICE}: tier price. It's a floating number

    In API GET response, has also a dedicated field alias named "wcb2b_group_tier_prices"
  • wcb2b_min: contains minimum quantity allowed.
    Value is an integer number
    In API GET response, has also a dedicated field alias named "wcb2b_min_quantity"
  • wcb2b_step: contains package increment quantity.
    Value is an integer number
    In API GET response, has also a dedicated field alias named "wcb2b_package_quantity"

Note: WooCommerce B2B extends default WooCommerce products REST API with own custom meta fields. For more informations, please visit: WooCommerce Official documentation


HTTP request (all products)
get
/wp-json/wc/v3/products

HTTP request (single product)
get
/wp-json/wc/v3/products/{ID}

Example response
{
    "id": 60,
    "name": "T-Shirt with Logo",
    "slug": "t-shirt-with-logo",
    "permalink": "https://demo.woocommerce-b2b.com/product/t-shirt-with-logo/",
    "date_created": "2020-06-13 00:00:00",
    "date_created_gmt": "2020-06-13 00:00:00",
    "date_modified": "2020-06-13 00:00:00",
    "date_modified_gmt": "2020-06-13 00:00:00",
    "type": "simple",
    "status": "publish",
    "featured": false,
    "catalog_visibility": "visible",
    "description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\n",
    "short_description": "<p>This is a simple product.</p>\n",
    "sku": "Woo-tshirt-logo",
    "price": "98",
    "regular_price": "100",
    "sale_price": "98",
    "date_on_sale_from": null,
    "date_on_sale_from_gmt": null,
    "date_on_sale_to": null,
    "date_on_sale_to_gmt": null,
    "price_html": "<del><span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>100.00</span></del> <ins><span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>98.00</span></ins>",
    "on_sale": true,
    "purchasable": true,
    "total_sales": 0,
    "virtual": false,
    "downloadable": false,
    "downloads": [],
    "download_limit": 0,
    "download_expiry": 0,
    "external_url": "",
    "button_text": "",
    "tax_status": "taxable",
    "tax_class": "",
    "manage_stock": false,
    "stock_quantity": null,
    "stock_status": "instock",
    "backorders": "no",
    "backorders_allowed": false,
    "backordered": false,
    "sold_individually": false,
    "weight": "",
    "dimensions": {
        "length": "10",
        "width": "12",
        "height": "0.5"
    },
    "shipping_required": true,
    "shipping_taxable": true,
    "shipping_class": "",
    "shipping_class_id": 0,
    "reviews_allowed": true,
    "average_rating": "0.00",
    "rating_count": 0,
    "related_ids": [
        50,
        40,
        43,
        51
    ],
    "upsell_ids": [],
    "cross_sell_ids": [],
    "parent_id": 0,
    "purchase_note": "",
    "categories": [
        {
            "id": 20,
            "name": "Tshirts",
            "slug": "tshirts-clothing"
        }
    ],
    "tags": [],
    "images": [
        {
            "id": 83,
            "date_created": "2020-06-13 00:00:00",
            "date_created_gmt": "2020-06-13 00:00:00",
            "date_modified": "2020-06-13 00:00:00",
            "date_modified_gmt": "2020-06-13 00:00:00",
            "src": "https://demo.woocommerce-b2b.com/wp-content/uploads/2020/06/t-shirt-with-logo-1.jpg",
            "name": "t-shirt-with-logo-1.jpg",
            "alt": ""
        }
    ],
    "attributes": [
        {
            "id": 1,
            "name": "Color",
            "position": 0,
            "visible": true,
            "variation": false,
            "options": [
            "Gray"
            ]
        }
    ],
    "default_attributes": [],
    "variations": [],
    "grouped_products": [],
    "menu_order": 0,
    "meta_data": [
        {
            "id": 967,
            "key": "_wpcom_is_markdown",
            "value": "1"
        },
        {
            "id": 3151,
            "key": "wcb2b_step",
            "value": "10"
        },
        {
            "id": 3152,
            "key": "wcb2b_min",
            "value": "20"
        },
        {
            "id": 3153,
            "key": "wcb2b_product_group_prices",
            "value": {
                "274": {
                    "regular_price": "",
                    "sale_price": ""
                },
                "275": {
                    "regular_price": "",
                    "sale_price": ""
                },
                "276": {
                    "regular_price": "95.00",
                    "sale_price": ""
                },
                "277": {
                    "regular_price": "98.00",
                    "sale_price": ""
                },
                "278": {
                    "regular_price": "80.00",
                    "sale_price": "78.00"
                }
            }
        },
        {
            "id": 3154,
            "key": "wcb2b_product_group_tier_prices",
            "value": {
                "275": {
                    "100": "50.00"
                },
                "278": {
                    "5": "75.00",
                    "10": "74.00",
                    "20": "70.00"
                }
            }
        }
    ],
    "wcb2b_group_tier_prices": [
        {
            "275": {
                "100": "50.00"
            },
            "278": {
                "5": "75.00",
                "10": "74.00",
                "20": "70.00"
            }
        }
    ],
    "wcb2b_group_prices": [
        {
            "274": {
                "regular_price": "",
                "sale_price": ""
            },
            "275": {
                "regular_price": "",
                "sale_price": ""
            },
            "276": {
                "regular_price": "95.00",
                "sale_price": ""
            },
            "277": {
                "regular_price": "98.00",
                "sale_price": ""
            },
            "278": {
                "regular_price": "80.00",
                "sale_price": "78.00"
            }
        }
    ],
    "wcb2b_min_quantity": [
        "20"
    ],
    "wcb2b_package_quantity": [
        "10"
    ],
    "_links": {
        "self": [
            {
                "href": "https://demo.woocommerce-b2b.com/wp-json/wc/v3/products/60"
            }
        ],
        "collection": [
            {
                "href": "https://demo.woocommerce-b2b.com/wp-json/wc/v3/products"
            }
        ]
    }
}
Customer API

Description

This API lets you retrieve and view all customers or a specific customer by ID.

WooCommerce B2B available meta fields:

  • wcb2b_group: contains customer assigned Group ID.
    Value is an integer number
    In API GET response, has also a dedicated field alias named "wcb2b_group"
  • wcb2b_status: contains customer status (if moderate registration is enabled).
    Value can be 0 (=disabled) or 1 (=enabled)
    In API GET response, has also a dedicated field alias named "wcb2b_status"
  • billing_vat: contains customer VAT number.
    Value is a string
    In API GET response, it's also available in billing address data

Note: WooCommerce B2B extends default WooCommerce customers REST API with own custom meta fields. For more informations, please visit: WooCommerce Official documentation


HTTP request (all customers)
get
/wp-json/wc/v3/customers

HTTP request (single customer)
get
/wp-json/wc/v3/customers/{ID}

Example response
{
    "id": 2,
    "date_created": "2020-06-13T00:00:0",
    "date_created_gmt": "2020-06-13T00:0:0",
    "date_modified": "2020-06-13T00:00:00",
    "date_modified_gmt": "2020-06-13T00:00:00",
    "email": "customer@woocommerce-b2b.com",
    "first_name": "John",
    "last_name": "Doe",
    "role": "customer",
    "username": "customer",
    "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "Google LLC",
        "address_1": "Central Park, 1",
        "address_2": "",
        "city": "New York",
        "postcode": "10001",
        "country": "US",
        "state": "NY",
        "email": "customer@woocommerce-b2b.com",
        "phone": "212-223-6457",
        "vat_number": "0987654321"
    },
    "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "Google LLC",
        "address_1": "Central Park, 1",
        "address_2": "",
        "city": "New York",
        "postcode": "10001",
        "country": "US",
        "state": "NY"
    },
    "is_paying_customer": true,
    "avatar_url": "https://secure.gravatar.com/avatar/25c626881bff6847aa6efc0820f01ec5?s=96&d=mm&r=g",
    "meta_data": [
        {
            "id": 62,
            "key": "wc_last_active",
            "value": "1592092800"
        },
        {
        "id": 353,
            "key": "shipping_method",
            "value": [
                "flat_rate:2"
            ]
        },
        {
            "id": 830,
            "key": "wcb2b_group",
            "value": "277"
        },
        {
            "id": 848,
            "key": "wcb2b_status",
            "value": "1"
        },
        {
            "id": 850,
            "key": "billing_vat",
            "value": "0987654321"
        }
    ],
    "wcb2b_status": 1,
    "wcb2b_group": {
        "id": 277,
        "name": "Partners",
        "discount": "15"
    },
    "_links": {
        "self": [
            {
                "href": "https://demo.woocommerce-b2b.com/wp-json/wc/v3/customers/2"
            }
        ],
        "collection": [
            {
                "href": "https://demo.woocommerce-b2b.com/wp-json/wc/v3/customers"
            }
        ]
    }
}

For more informations about REST API, please take a look to WooCommerce Official documentation.

Templates customization
WooCommerce B2B templates can be override to customize as you prefer.

WooCommerce B2B make use of same WooCommerce override system, so it's possible to create own templates and customize them.

Here a list of WooCommerce B2B templates that can be customized:

  • templates/single-product/tier-price.php: display list of tier group prices in single page product.
  • templates/email/wcb2b-customer-onquote-order.php: email received from customers when a new quote is created.
  • templates/email/wcb2b-customer-quoted-order.php: email received from customers when a quote is modified and set on "Quoted" status.
  • templates/email/wcb2b-customer-status-notification.php: email received from customers when his account is active.
  • templates/email/wcb2b-new-quote.php: email received from admin when a new quote is created.

To override, simply copy one of these files in: wp-content/themes/{YOUR_ACTIVE_THEME}/woocommerce/ by preserving the same folder tree.

To know more about this kind of system, take a look to Template structure & Overriding templates via a theme.

Frequently Asked Questions
Take a look to users most common questions and learn more about WooCommerce B2B.

Take advantage of other users experience, by reading our FAQs

Changelog
What's new in latest WooCommerce B2B version?

Here all the versions of WooCommerce B2B: Changelog

Support
Need help with WooCommerce B2B and you cannot find the solution in documentation?

Thanks for purchasing WooCommerce B2B plugin for WordPress/WooCommerce, proudly developed by @code4life, visit the author website.

If you have any kind of question or doubt, please visit new WooCommerce B2B Support Center, we'll do our best to assist you.

WooCommerce B2B support team