How discount codes work with wholesale prices
Two things decide how a code behaves next to wholesale prices: the Combinations section on each code, and a store-wide switch in your checkout settings. This article explains both.
On each code: Combinations
In the code form, Combinations lets you choose which other Shopify discounts this code may combine with: Shopify product discounts, Shopify order discounts and Shopify shipping discounts. With none ticked, the code does not combine with other discounts. The form also states that wholesale prices always apply: this section only controls other Shopify discounts.

For a code of type Products in the cart, the discount is taken from the wholesale price. For Entire order, it is taken from the order subtotal at wholesale prices.
Store-wide: Shopify discount codes switch
Open Settings › Shopify Checkout Settings and find Shopify discounts. The switch Let wholesale buyers use Shopify discount codes too decides how Shopify discount codes work for wholesale buyers. It is off by default.
| Switch | What it does |
|---|---|
| Off | A discount code replaces the wholesale price when it saves more. |
| On | The code is added on top of the wholesale price. |

The same section has Shopify automatic discounts, which decides whether your Shopify automatic discounts also apply to wholesale orders:
| Option | What it does |
|---|---|
| Off (default) | Your Shopify automatic discounts don't combine with wholesale prices. |
| All wholesale buyers | Your Shopify automatic discounts are added on top of wholesale prices for every wholesale buyer. |
Shopify automatic discounts are never added to orders you create in Sol: their prices are already set line by line.
[!WARNING] Because the code form and the store-wide switch both play a part, test your first code with a wholesale test customer and check the totals at checkout before you share it.
Who can use a code
Only the buyers you choose under Eligibility can use a wholesale code: Customer groups and/or Customers with specific tags, or Selected customers. A customer who is not in the chosen groups, tags or customer list gets Shopify's normal "not valid" message.