Restrict Coupons for B2B / B2C Users

Available starting with version 2.5.0, a new "restriction" feature is added to coupons in B2BKing. You can control which roles can use a particular coupon, or which B2BKing group. You can also use the keywords: "b2b", "b2c", "loggedout"

Here's how it works and how you can use it:

Coupon Restriction Setup #

In WooCommerce->Coupons you can add or edit a coupon and control restriction in the "Usage Restriction" panel:

Usage restriction panel

At the very bottom of the panel, b2bking adds a new option named "B2BKing allowed options". Here you can add roles directly (editor, administrator etc). You can add multiple roles, comma-separated. You can also use "b2b", "b2c", "loggedout", "b2bking_group_123"

If you use roles, roles must be referred to by their name.

How to get the group name: #

For B2B groups, the group name is "b2bking_group_"+GROUP ID (e.g. b2bking_group_52, b2bking_group_8, etc.)

To get a group's ID, go to the backend to B2BKing -> Groups and click on the group. The number in the URL is the ID (e.g. if the URL shows ?post=1234, then the group ID is 1234)

Remove coupons completely for B2B #

It is also possible to remove coupon functionality completely for B2B users. To do this, go to B2BKing -> Settings -> Other and activate 'Disable coupons for B2B users':

Powered by BetterDocs