Wholesale Discounts: How to Apply a Percentage Discount on All Products

Note: This article covers the Core (Free) version of B2BKing. The Pro version includes additional options and features.

Installing the Plugin #

Start by installing and activating the free B2BKing plugin. Go to Plugins → Add New and search for "B2BKing":

Setting Up Your Products #

Whether you're creating new products or already have existing ones on your site, the process is the same. For this tutorial, let's say we have three standard WooCommerce products priced at $499, $200, and $150:

These are regular B2C prices visible to all users by default. What we want to do is give wholesale buyers a 10% discount across all products, without having to manually edit each one.

Creating a Dynamic Rule #

Go to B2BKing → Dynamic Rules and click "Create new rule":

Configure the rule with the following settings:

  • Rule type: Discount Percentage
  • Applies to: Cart Total (/all products)
  • Who: All registered B2B users
  • How much: 10%

Make sure to also enable the "Discounted Price Becomes Sale Price" checkbox, which ensures the discount is reflected directly on product prices rather than only applied at checkout:

Save the rule once you're done.

Assigning Users to the B2B Group #

Since we set the rule to apply only to B2B users, we need to make sure the relevant customers are assigned to the right group. You can do this on any user's profile page by scrolling down to "Customer Group":

User is B2C

Change the group to B2B and save the profile:

User is now B2B

Seeing the Results #

Log in as a B2B user and refresh the shop page. You'll see that every product now shows a 10% discount, calculated automatically:

Prices after applying the wholesale discount

Customizing the Discount Label #

By default, discounted products display a "Sale!" badge. If you'd like something more descriptive, you can enter a custom label in the "Discount name" field when configuring the rule:

Configuring a discount name

For example, setting it to "B2B Discount" replaces the default sale badge with your custom text:

Sale badge displays the discount name

Powered by BetterDocs