Restrict Coupons for B2B / B2C Users

Starting with B2BKing v2.5.0, a new "restriction" feature has been added to coupon functionality. You can control which B2BKing groups, WP roles, or user categories can use particular coupon. You can also use the keywords: "b2b", "b2c", "loggedout"

Here's how this works and how it can be used:

How to set up coupon restrictions #

In Marketing -> Coupons you can add or edit a coupon and control restriction through the "Usage restriction" panel:

Usage restriction panel

At the bottom of the panel, the plugin adds a new option named "B2BKing allowed options". If left empty, all users are allowed to use the coupon. Otherwise, if you specify certain options, only those specified will be allowed to use the coupon.

Here you can add WP roles directly (such as editor, administrator etc) and you can list multiple roles, comma-separated. You can also use "b2b", "b2c", "loggedout", or "b2bking_group_123" to target a particular group.

If you use roles, roles must be referred to by their slug, not their display name. For example if you have a custom role "VIP User", you would need to use its slug, which might have the form vipuser, or vip_user.

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)

Disable 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