How Do I Edit Emails Sent To Users?

How Do I Edit Emails Sent To Users?

WooCommerce Wholesale Lead Capture gives you complete control over the emails that are sent to users as they make their journey to becoming a fully fledge wholesale customer.
To edit the emails that are sent to your new registrations there is a page dedicated to this under the Settings.

Login to your WordPress install
Click on WooCommerce ->Settings
Click on the Wholesale Lead tab
In the sub-menu choose Emails

wholesale-lead-capture-email-editing
From here you can edit emails for the following:

New User Admin Notification Email Template
New User Admin Notification Email Template (Auto Approved)
New User Email Template
Approval Email Template
Rejected Email Template

There are a number of template codes you can use within your email that are auto-replaced with the proper value. The availability of these template codes vary depending on the email template you are editing:
{user_management_url}, {wholesale_login_url}, {site_name}, {full_name}, {first_name}, {last_name}, {username}, {password}
If you are using the Custom Fields on your Wholesale Registration Form, you can also add this information using template tags in your emails. You』ll find the 「Show Custom Field Template Tags」 option with all of the available custom field tags that you can use.
Show Available Custom Field Template Tags (Click to Zoom)

How To Modify The — No Category Filter — Text On The Category Filter Dropdown

How To Modify The — No Category Filter — Text On The Category Filter Dropdown

By default on the Wholesale Order Form, the drop-down filter for categories will display — No Category Filter — to indicate when the form is not being filtered by category.
No Category Filter Drop Down
Some customers have requested the text be changed, but this isn』t unanimous as some people like this wording.
So to help those who want to change the text, we』ve wrapped it in a filter which makes it easy to alter with a small snippet of code.
Add the following code to your functions.php file in your theme and adjust the wording according to your needs:
function modify_no_category_filter_text () {
return "--Whatever Text You Want Here--";
}

add_filter( "wwof_filter_listing_no_category_filter_text" , "modify_no_category_filter_text" );

How To Set A Default Country On Registration Form

How To Set A Default Country On Registration Form

If you typically accept most of your wholesale registrations from one country you might like to default the country to a specific one.
To do this currently in WooCommerce Wholesale Lead Capture you need to add a small snippet of code to your functions.php file in your theme:
// Change the default country on WooCommerce Wholesale Lead Capture's registration
function wwsSetRegistrationDefaultCountry() {

if ( is_page( 'wholesale-registration-page' ) ) {
?>

jQuery(document).ready(function () {
jQuery('select#wwlc_country').val('AU');
jQuery('select#wwlc_country').trigger('change');
});

<?php
}

}
add_action( 'wp_footer', 'wwsSetRegistrationDefaultCountry', 99 );

A few notes on implementing this code:

If you have renamed the registration page, it』s possible that the page slug has changed as well. Ensure you replace 『wholesale-registration-page』 in the code above with the correct page slug
The code above will default to 『AU』 which is Australia. Change this to whichever country you want to default to. You can find a list of 2-digit country codes here.

Create URL Query Parameter to filter categories on the Wholesale Order Form

Create URL Query Parameter to filter categories on the Wholesale Order Form

Are you looking for a way to easily customize multiple Wholesale Order Forms to display different categories?
If you want to display different Wholesale Order Forms, the best way to do so is by using the Wholesale Order Form shortcodes.
However, if you have a lot of product categories and you want an easier way to redirect users with filtered category, an alternative is by using a URL Query Parameter for the Wholesale Order Form.
To do this, you need to add the custom code below on your functions.php. Then you can now create a URL with a query parameter based on your product category.

add_filter( 'wwof_product_args' , function( $args , $filter ) {
$cat_filter = isset( $_POST[ 'cat_filter'] ) ? $_POST[ 'cat_filter'] : '';
if( empty( $cat_filter ) ) {
parse_str( parse_url( $_SERVER['HTTP_REFERER'] , PHP_URL_QUERY ) , $output );
if( isset( $output['cat_slug'] ) ) {
$args[ 'tax_query' ][] = array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => array( $output['cat_slug'] ),
);
}
}
return $args;
} , 90 , 2 );
To use this, let』s say you have a product category with a slug 「clothing」. Get the URL of your Wholesale Ordering page and add ?cat_slug=clothing at the end. The URL should look something like this:
http://yoursite.com/wholesale-ordering/?cat_slug=clothing
When this link is clicked or visited, it will redirect you to the Wholesale Order Form page filtered under the clothing category.

Last Updated: 2 years ago in WooCommerce Wholesale Order Form

WooCommerce Wholesale Prices Premium Getting Started Guide

WooCommerce Wholesale Prices Premium Getting Started Guide

WooCommerce Wholesale Prices Premium

Thank you for purchasing the Premium add-on to our free Wholesale Prices plugin!
This document is a getting started guide for the WooCommerce Wholesale Prices Premium plugin for WooCommerce. 
The Premium plugin lets you further reduce your reliance on clunky spreadsheets so all of your wholesale customers can enjoy ordering via your online store. It gives you a stack of extra features that will help you be more advanced about the way you offer wholesale products to your customers.
Here』s what this guide will cover:

Overview – we describe what the plugin does in addition to the free plugin
Additional Wholesale Customer Roles – we will show you how to add more user role levels so you can separate your wholesale customers into groups
More Wholesale Pricing Features – we show all about the extra flexible new ways you can apply wholesale pricing to your products
Product Visibility  – show and hide products to both retail and wholesale customers and by their role as well
Shipping Mapping – this important feature will let you set up wholesale specific shipping
Payment Gateway Mapping – learn how to give your wholesale customers access to specific payment gateways
Minimum Order Requirements – set a minimum for activating wholesale pricing that you wholesale customers must meet
Advanced Tax – taxing is an important part of wholesale selling and we』ll show you how flexible you can make it
Other Plugins In The Suite – we』ll show you why you should consider adding Wholesale Order Form and Wholesale Lead Capture
Getting Help – we understand this can be an intricate tool, we』ll show you where to get help if you need it

Overview
WooCommerce Wholesale Prices Premium is the premium add-on plugin for the free WooCommerce Wholesale Prices plugin. It requires the free plugin to be installed and activated for it to work.
There are hundreds of features included in the premium add-on, you can see here for a full list, but today we』ll go over just a few of the major features so that you can get up and running as fast as possible.

Subscribe to Wholesale Suite

First, we』ll talk about the ability to add more wholesale roles and why you』d want to do that.
Additional Wholesale Roles
In the getting started guide for the free wholesale prices plugin we discussed why prices are attached to user roles.
In Prices Premium you can add additional user roles so you can do things like:

Create separate groups of wholesale customers
Define additional levels of pricing
Provide different minimum order requirements
And much more…

Adding Wholesale Roles In WooCommerce With Wholesale Suite

You can add extra roles easily via the WooCommerce->Wholesale Roles menu. It works a bit like a WordPress categories page so it should look familiar.
For each role added to the system, you will see wholesale pricing fields on your products.

There are two main reasons we』ve found that people add extra roles for:

They want to separate local wholesale customers from those that are from other countries so they can do different pricing, minimum levels, shipping methods, etc for those customers.
They want to create distinct 「levels」 of wholesale relationships, like Bronze, Silver, Gold, Platinum where the benefits and pricing get better as they go up the levels.

I encourage you to think through the structure you want for your wholesale customers before moving on to setting pricing.
Read this article for more in-depth instructions on how to add additional wholesale roles.
Percentage (%) Based Pricing & Quantity Based Pricing
In the free plugin, you can set wholesale pricing via the Product edit screen and for a lot of cases and this is fine for many stores.
But in the Prices Premium plugin, you can now also set wholesale pricing on the category level and the global level. You can also create quantity based pricing where the customer gets discounts on the price the more they buy.
We have a very detailed guide on how wholesale pricing works in Wholesale Suite here. Rather than re-iterate that detailed guide here, I will encourage you to go over to that article and get up to speed.
I will just explain one concept quickly though because it』s important. Wholesale prices follow rules of precedence which is roughly this:
Product Wholesale Price -> Category Level % Discount -> Global % Discount
If the Product』s wholesale price has not been set, the system will look to see if there is a category level % discount set, if not it will look to see if there is a global % discount. It always starts at the lowest level and stops when it finds that there has been a price defined. 
So if you have defined both a global % discount that will be used across all of our products globally, but if you have set a specific price on a certain product that price will be used for that product.
Again, read the wholesale pricing guide and it will explain both this concept and go into details about how to set those % based prices properly.
Product Visibility
In Prices Premium you can show and hide products from customers in a few exciting ways. It gives you lots of flexibility such as being able to make wholesale-only products that aren』t shown to retail customers or likewise being able to hide non-wholesale products from wholesale customers.
The first is a setting called 「Only Show Wholesale Products To Wholesale」 which basically does what it says. Once enabled, your wholesale customers will only be able to see a product if it has wholesale pricing defined (and yes, this includes % based pricing).

Only Show Wholesale Products WooCommerce

Next is a Product based setting which you will find on the Publish box of products called 「Restrict To Wholesale Roles」. Here you can restrict the visibility of a whole product to specific wholesale levels. This can be handy if you only open up certain products to certain customers, such as when you have separated customers by role geographically.

Restrict Product To Wholesale Roles In WooCommerce

Lastly, you can also restrict the visibility of individual product variation on a variable type products. This can be done per role as well, much like the restrict to wholesale roles feature.

Wholesale Exclusive Variations In WooCommerce

Again, we have an in-depth guide about product visibility here which you can dig into.
Shipping & Payment Gateway Mapping
One of the cool things about having users separated into user roles is that you can 「map」 things to those roles.
We do this in quite a few places, two major ones being the shipping mapping and the payment gateway mapping.
Shipping Method Mapping
Mapping a shipping method means that you can set the system to only show people on that wholesale role certain shipping methods. You can also hide those shipping methods so that they』re only visible to that particular wholesale role.
WooCommerce itself has excellent location-driven shipping controls. So you can have a shipping method for only a specific area.
Those two things combined mean that you can create specific wholesale shipping pricing per area per role.
A good example of this in use might be to create a 「Local Pickup」 shipping method for your local area only and also only make that available to wholesale customers.
Don』t worry, we have a full guide on how this shipping mapping works here. Once you get the hang of it, it』s not too complicated, but it can take a little while to set up if you have a lot of regions. Stick with it, it』s worth the extra time as in the long run you will be able to give wholesale customers accurate wholesale shipping rates.

Wholesale Shipping Method Mapping Per Role

Payment Gateway Mapping
Not quite as complex as shipping method mapping, you can also apply the same mapping concept to payment gateways.
One thing to note is that you can map a disabled payment gateway. WooCommerce itself ensures that a disabled payment gateway will not show for customers. However, if you map it to a wholesale role, you can choose to have that payment gateway enable just for that wholesale role.
You can also map payment gateways to multiple wholesale roles.
A good example of this in use is you might want to enable the bank transfer payment gateway for wholesale customer roles, but not for retail customers.

Wholesale Payment Gateway Mapping Per Role In WooCommerce

Minimum Order Requirements
A very popular feature in Prices Premium is the ability to set minimum order requirements so that wholesale pricing doesn』t get activated unless your wholesale customer first satisfies a minimum amount in their cart.
Here』s what the settings look like:

WooCommerce Wholesale Minimum Order Requirements

And here』s what the message looks like on the front end when they haven』t met their requirements yet:

Minimum Order Requirements Notice

You can also use the 「mapping」 concept here too so that you can override the minimum order restriction rules per wholesale role.
One extra note, it can be helpful to know that although customers can still add products to the cart the cart won』t reflect the wholesale price for those products until they meet the minimum. 
This is because in many cases store owners still wish for wholesale customers to be able to buy a lower quantity if they really need to but they shouldn』t get wholesale pricing for those small orders. We go into depth about why this decision was made here.
If you wish you can also turn off the checkout button until they meet the restrictions if you wish.
Advanced Tax
Finally, we reach every world government』s favorite topic, taxation!
Understanding your business tax responsibilities is important when you enter into selling to wholesale customers. Some countries have specific rules that much be followed when it comes to the display of prices and their tax components.
WooCommerce handles tax based on location and for the most part, it does so fairly well. When it comes to tax, Prices Premium doesn』t replicate anything that WooCommerce does, it merely builds on it.
We effectively mirror the tax display options in WooCommerce itself, only for wholesale level customers:

Display wholesale prices in the store including or excluding tax (similar to the same for retail products)
Show a wholesale price suffix (similar to retail price suffix)

Another big thing we』ve added is the ability to do tax exemptions.
You can choose to do this globally, meaning all wholesale customers are tax exempt. Or you can, as you might have already guessed, map the wholesale exemptions per wholesale role.

Advanced Features
When it comes to solving wholesale for WooCommerce we believe in a holistic approach. You need to solve all three of the big problems:

Setting wholesale prices, visibility, tax, etc. This is solved with Prices Premium as you』ve seen in this guide.
Efficient ordering – this is very important and greatly affects the happiness of your customers when they do business with you
Recruiting and managing wholesale level customers

WooCommerce Wholesale Order Form

WooCommerce Wholesale Order Form Plugin

The time it takes for a wholesale customer to place an order is one of the biggest pain points you can eliminate.
Wholesale customers are not like regular retail customers. They don』t want to sift through your normal shop pages adding products to cart that way. They need a tabular form-based interface that makes it fast to add products to the cart in the quantities they desire.
This is where the Order Form plugin comes in.
Top Feature Highlights:

Your whole catalog on one page – searchable and categorized
No page reloads, full ajax enabled so wholesalers can add to cart without leaving the page
Slimline tabulated interface that is mobile & tablet friendly
Wildcard keyword & SKU searching
Hierarchical category filter
Permissions control so only those allowed can access the form

These are just a few high-level features that you』ll give your wholesale customers by using the Order Form plugin.
WooCommerce Wholesale Lead Capture

WooCommerce Wholesale Lead Capture Plugin

Managing wholesale level customers can be a bit of a headache if you are doing it manually. The Wholesale Lead Capture plugin gives you a wholesale specific registration form, dedicated wholesale login page, sign up email sequences, and your choice of manual or automated approvals.
It really takes the pain out of manually recruiting & registering wholesale customers which will save you time and let you put wholesale recruitment on autopilot.
Top Feature Highlights:

Registration form builder lets you capture whatever information you need during sign-up
Pre-fill the checkout fields with the information that you capture during sign up to smooth the first-order process for your new wholesale customer
Built-in spam protection with honeypot technology and optionally Google Recaptcha
Automated email sequences for admin and customer-facing approval and notification emails
Complete user approvals system which can be based on manual approvals or 100% automated if you wish

The Lead Capture plugin will make recruiting your wholesale customers and managing them much less painful.
Help & Support
We have a dedicated support team for Wholesale Suite who knows our products, WooCommerce, and the industry very well. You』re welcome to make use of their expertise at any time, worldwide.
If you are an existing customer please go to the support ticket request form and send us a message.
If you are a free plugin user, please send us a support request on the forum, we actively monitor the WordPress.org support forums for the free plugin and help our users there as best as we can.

How To Troubleshoot Emails Not Sending

How To Troubleshoot Emails Not Sending

Are your customers having trouble receiving the email coming from your store』s Lead Capture plugin?
There are a variety of different ways that email deliverability can be affected.
Please go through the following three troubleshooting steps and contact support if further assistance is required.
#1. Customise the subject lines and email content of your Lead Capture emails
Some providers are more sensitive than others and they have different filters and rules to mark an email as spam. The content of your email could be triggering spam filters on the receiver』s email service which would cause the emails to be blocked even before they get to the account.
This type of rejection happens a lot on big email providers like Gmail, Hotmail and Yahoo who are very sophisticated about how spam is handled.
Try changing the subject on your emails. You can do this easily under WooCommerce->Settings, Lead Capture tab, Emails settings page.
Suggestion: Instead of the default 「Registration Approved」 try something more specific and less likely to trigger a spam filter such as 「Your wholesale registration was approved on XYZ Store」
Also alter the body content of the emails to make them more specific to your store and less standardised.
#2. Ensure your domain is allowed to send emails from that FROM address
If you are routinely experiencing email deliverability issues but it seems random (eg. its a problem for some users but not others) then it』s likely not related to your WordPress/WooCommerce installation but more to do with your domain. You are likely experiencing a policy based rejection.
To fix this, the email address you are sending FROM (as set in both Settings->General and WooCommerce->Settings, Emails tab) must be allowed to send from your domain.
This means if you have a yahoo.com email address in those settings, it』s likely that the receiving server is checking against your domain to see if it』s allowed to send on behalf of yahoo.com (which it isn』t).
Suggestion: Try the following which should enhance the reputation of your domain and avoid most policy based rejections.

Setup an email account on your domain, eg. [email protected], which will serve as the FROM address for all your website』s emails. Set this address as the email address under Settings->General and also the From address under WooCommerce->Settings, Emails tab.
Contact a web developer or your web host to ask what the proper DKIM, SPF and DMARC settings should be on your domain to ensure email deliverability.

See here for more information about policy based rejections.
#3. Try using an SMTP server for sending emails instead
If the above two tips don』t get the emails flowing, then it might be possible to switch to using an SMTP server for sending your emails instead.
This can be done by using SMTP via your web host (contact your host about sending emails via SMTP with your hosting account) or via a transactional email sending service like SendGrid, Mandrill or MailGun. Transactional API based services are generally better for large stores to ensure enhanced deliverability.
Click here to read about how to enable SMTP sending on your WordPress installation.
Still experiencing issues with email deliverability?
Please ensure you have tried all three of the above troubleshooting steps before contacting support.
If you are still experiencing trouble, please get in touch and we will do our best to help you diagnose the issue.

WooCommerce Wholesale Prices Premium REST API Documentation

WooCommerce Wholesale Prices Premium REST API Documentation

As of version 1.18, WooCommerce Wholesale Prices Premium (WWPP) introduces integration with WooCommerce API. This allows Wholesale Products to be created, read, updated, and deleted using WordPress REST API Authentication methods and standard HTTP verbs which are understood by most HTTP clients. The current WP REST API integration version is v3.
Getting Started
In this article, we won』t cover how to access or use the endpoints. It』s up to you to decide which method you will use to access the data. But in our examples, we use JSON to show how the data can be sent and received. To learn more about WooCommerce REST API, please check the following sources:

Learn how to set up your WooCommerce API key here: https://docs.woocommerce.com/document/woocommerce-rest-api/
Learn how to use WooCommerce REST API with PHP here: https://packagist.org/packages/automattic/woocommerce
Learn how to use WooCommerce REST API with Postman here: https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API
Learn more about WooCommerce REST API here: https://woocommerce.github.io/woocommerce-rest-api-docs/

Wholesale Data Properties In API』s Response
WWPP API introduces a new wholesale_data property in the response to group all wholesale data. This property contains:

Attribute
Type
Description
Available On

wholesale_price
array
The Wholesale Prices set on the backend
Simple, Variation

variable_level_wholesale_minimum_order_quantity
array
The Parent Product Wholesale Minimum Order Quantity
Variable

wholesale_minimum_order_quantity
array
The Wholesale Minimum Order Quantity
Simple, Variation

variable_level_wholesale_order_quantity_step
array
The Parent Product Wholesale Order Quantity Step
Variable

wholesale_order_quantity_step
array
The Wholesale Order Quantity Step
Simple, Variation

wwpp_product_wholesale_visibility_filter
array
The Restrict To Wholesale Roles for Simple and Variable, the Wholesale Exclusive Variation for Variation
Simple, Variable, Variation

wwpp_ignore_cat_level_wholesale_discount
string
The Disregard Product Category Level Wholesale Discount option
Simple, Variable

wwpp_ignore_role_level_wholesale_discount
string
The Disregard Wholesale Role Level Wholesale Discount option
Simple, Variable

wwpp_enable_quantity_discount_rule
string
The Enable further wholesale pricing discounts based on quantity purchased? option
Simple, Variable, Variation

wwpp_quantity_discount_rule_mapping
array
The Product Quantity Based Wholesale Pricing rules
Simple, Variable, Variation

wholesale_price
The wholesale_price property contains the wholesale price set on the backend/product editor, not the calculated wholesale price. The response is formatted like this:
"wholesale_price": {
"": ""
}
Example of the response:
"wholesale_price": {
"gold_role": "50",
"wholesale_customer": "100"
}
variable_level_wholesale_minimum_order_quantity
The variable_level_wholesale_minimum_order_quantity property contains the Parent Product Wholesale Minimum Order Quantity set on the backend/product editor. Please note that this option only available for the Variable (parent) products. The response is formatted like this:
"variable_level_wholesale_minimum_order_quantity": {
"": ""
}
Example of the response:
"variable_level_wholesale_minimum_order_quantity": {
"gold_role": "5",
"wholesale_customer": "10"
}
wholesale_minimum_order_quantity
The wholesale_minimum_order_quantity property contains the Wholesale Minimum Order Quantity set on the backend/product editor. It』s the same as variable_level_wholesale_minimum_order_quantity, but for Simple Products and Variations. The response is formatted like this:
"wholesale_minimum_order_quantity": {
"": ""
}
Example of the response:
"wholesale_minimum_order_quantity": {
"gold_role": "5",
"wholesale_customer": "10"
}
variable_level_wholesale_order_quantity_step
The variable_level_wholesale_order_quantity_step property contains the Parent Product Wholesale Order Quantity Step set on the backend/product editor. Please note that this option only available for the Variable (parent) products. The response is formatted like this:
"variable_level_wholesale_order_quantity_step": {
"": ""
}
Example of the response:
"variable_level_wholesale_order_quantity_step": {
"gold_role": "2",
"wholesale_customer": "3"
}
wholesale_order_quantity_step
The wholesale_order_quantity_step property contains the Wholesale Order Quantity Step set on the backend/product editor. It』s the same as variable_level_wholesale_order_quantity_step, but for Simple Products and Variations. The response is formatted like this:
"wholesale_order_quantity_step": {
"": ""
}
Example of the response:
"wholesale_order_quantity_step": {
"gold_role": "2",
"wholesale_customer": "3"
}
wwpp_product_wholesale_visibility_filter
The wwpp_product_wholesale_visibility_filter property contains the value of Restrict To Wholesale Roles option for Simple and Variable (parent) products, and Wholesale Exclusive Variation option for Variation. The response is formatted like this:
"wwpp_product_wholesale_visibility_filter": [""]
Example of the response:
"wwpp_product_wholesale_visibility_filter": ["wholesale_customer","gold_role"]
wwpp_ignore_cat_level_wholesale_discount
The wwpp_ignore_cat_level_wholesale_discount property contains the value of Disregard Product Category Level Wholesale Discount option under the Wholesale Pricing Options section. The value is 「yes」 or 「no」. Example of the response:
"wwpp_ignore_cat_level_wholesale_discount": "yes"
wwpp_ignore_role_level_wholesale_discount
The wwpp_ignore_role_level_wholesale_discount property contains the value of Disregard Wholesale Role Level Wholesale Discount option under the Wholesale Pricing Options section. The value is 「yes」 or 「no」. Example of the response:
"wwpp_ignore_role_level_wholesale_discount": "yes"
wwpp_enable_quantity_discount_rule
The wwpp_enable_quantity_discount_rule property contains the value of Enable further wholesale pricing discounts based on quantity purchased? under the Product Quantity Based Wholesale Pricing section. The value is 「yes」 or 「no」. Example of the response:
"wwpp_enable_quantity_discount_rule": "yes"
wwpp_quantity_discount_rule_mapping
The wwpp_quantity_discount_rule_mapping property contains the rules of Product Quantity Based Wholesale Pricing. The response is formatted like this:
"wwpp_quantity_discount_rule_mapping": [
{
"wholesale_role": "",
"start_qty": "",
"end_qty": "",
"price_type": "",
"wholesale_price": ""
}
]
Example of the response:
"wwpp_quantity_discount_rule_mapping": [
{
"wholesale_role": "wholesale_customer",
"start_qty": "10",
"end_qty": "15",
"price_type": "fixed-price",
"wholesale_price": "50"
},
{
"wholesale_role": "gold_role",
"start_qty": "5",
"end_qty": "",
"price_type": "percent-price",
"wholesale_price": "20"
}
]
Wholesale Data Parameters In API Request
WWPP API allows you to provide some parameters to set the wholesale data of a product. The parameters you can use are:

Parameters
Type
Description
Available For

wholesale_price
array
The Wholesale Prices set on the backend
Simple, Variation

wholesale_minimum_order_quantity
array
The Wholesale Minimum Order Quantity
Simple, Variable, Variation

wholesale_order_quantity_step
array
The Wholesale Order Quantity Step
Simple, Variable, Variation

wholesale_visibility_filter
array
The Restrict To Wholesale Roles for Simple and Variable, the Wholesale Exclusive Variation for Variation
Simple, Variable, Variation

ignore_cat_level_wholesale_discount
string
The Disregard Product Category Level Wholesale Discount option
Simple, Variable

ignore_role_level_wholesale_discount
string
The Disregard Wholesale Role Level Wholesale Discount option
Simple, Variable

wholesale_quantity_discount_rule_mapping
array
The Product Quantity Based Wholesale Pricing rules
Simple, Variable, Variation

wholesale_price
The wholesale_price parameter is used to set the wholesale prices. The wholesale price value should be an integer.
The parameter data is formatted like this:
"wholesale_price": {
"":
}
Example of the request:
"wholesale_price": {
"gold_role": 50,
"wholesale_customer": 100
}
The current behavior of this parameter:1. If you provide empty string for the _wholesale_price_ parameter, it will be ignored as if you don』t set _wholesale_price_ parameter at all.2. If you provide non-wholesale role keys (regular customer or non-existing roles), it will be ignored. It will only input wholesale price with a valid wholesale role.3. If you provide string or empty string value as the wholesale price, it will be ignored. It will only input integer wholesale price.
wholesale_minimum_order_quantity
The wholesale_minimum_order_quantity parameter is used to set the Parent Product Wholesale Minimum Order Quantity option for Variable (parent) products or Wholesale Minimum Order Quantity option for Simple products and Variations. The minimum order quantity value should be an integer.
The parameter data is formatted like this:
"wholesale_minimum_order_quantity": {
"":
}
Example of the request:
"wholesale_minimum_order_quantity": {
"gold_role": 5,
"wholesale_customer": 10
}
The current behavior of this parameter:

If you provide empty string for the _wholesale_minimum_order_quantity_ parameter, it will be ignored as if you don』t set _wholesale_minimum_order_quantity_ parameter at all.
If you provide non-wholesale role keys (regular customer or non-existing roles), it will be ignored. It will only input minimum order quantity with a valid wholesale role.
If you provide string or empty string value as the minimum order quantity, it will be ignored. It will only input integer minimum order quantity.

wholesale_order_quantity_step
The wholesale_order_quantity_step parameter is used to set the Parent Product Wholesale Order Quantity Step option for Variable (parent) products or Wholesale Order Quantity Step option for Simple products and Variations. The order quantity step value should be an integer.
The parameter data is formatted like this:
"wholesale_order_quantity_step": {
"":
}
Example of the request:
"wholesale_order_quantity_step": {
"gold_role": 2,
"wholesale_customer": 3
}
The current behavior of this parameter:

If you provide empty string for the _wholesale_order_quantity_step_ parameter, it will be ignored as if you don』t set _wholesale_order_quantity_step_ parameter at all.
If you provide non-wholesale role keys (regular customer or non-existing roles), it will be ignored. It will only input order quantity step with a valid wholesale role.
If you provide string or empty string value as the order quantity step, it will be ignored. It will only input integer order quantity step.

wholesale_visibility_filter
The wholesale_visibility_filter parameter is used to set the value of Restrict To Wholesale Roles option for Simple and Variable (parent) products, and Wholesale Exclusive Variation option for Variation.
The parameter data is formatted like this:
"wholesale_visibility_filter": [""]
Example of the request:
"wholesale_visibility_filter": ["wholesale_customer","gold_role"]
The current behavior of this parameter:

 If you provide empty string for the _wholesale_visibility_filter_ parameter, it will remove the restriction set previously
If you provide non-wholesale role keys (regular customer or non-existing roles), it will be ignored. It will only save valid wholesale roles.
The wholesale role keys you provide will replace the previous restriction set. So if you have 「Wholesale Customer」 set in your restriction, sending a request with 「gold_role」 won』t add it to the restriction but replace it entirely. So now your restriction is set to 「Gold Role」 only.

ignore_cat_level_wholesale_discount
The ignore_cat_level_wholesale_discount parameter is used to set the value of Disregard Product Category Level Wholesale Discount option under the Wholesale Pricing Options section. The value should be either 「yes」 or 「no」.
Example of the request:
"ignore_cat_level_wholesale_discount": "yes"
The current behavior of this parameter:

If you provide empty string for the _ignore_cat_level_wholesale_discount_ parameter, it will be ignored as if you don』t set _ignore_cat_level_wholesale_discount_ parameter at all.
If you provide value other than 「yes」 or 「no」, it will be ignored as if you don』t set _ignore_cat_level_wholesale_discount_ parameter at all.

ignore_role_level_wholesale_discount
The ignore_role_level_wholesale_discount parameter is used to set the value of Disregard Wholesale Role Level Wholesale Discount option under the Wholesale Pricing Options section. The value should be either 「yes」 or 「no」.
Example of the request:
"ignore_role_level_wholesale_discount": "yes"
The current behavior of this parameter:

If you provide empty string for the _ignore_role_level_wholesale_discount_ parameter, it will be ignored as if you don』t set _ignore_role_level_wholesale_discount_ parameter at all.
If you provide value other than 「yes」 or 「no」, it will be ignored as if you don』t set _ignore_role_level_wholesale_discount_ parameter at all.

Wholesale_quantity_discount_rule_mapping (Variable Product)
The wholesale_quantity_discount_rule_mapping parameter is used to set the rules of Product Quantity Based Wholesale Pricing. Please keep in mind the below format is designed for Variable product only.
The wholesale_quantity_discount_rule_mapping properties:

Attribute
Type
Description

wholesale_role
string
The wholesale role key

start_qty
string
The start quantity for the rule to active

end_qty (optional)
string
The end quantity for the rule to active

price_type
string
The discount rule type. The value should be 「fixed-price」 or 「percent-price」

wholesale_price
string
The discount price or percentage

The parameter data is formatted like this:
"wholesale_quantity_discount_rule_mapping": [
{
"wholesale_role": "",
"start_qty": "",
"end_qty": "",
"price_type": "",
"wholesale_price": ""
}
]
Example of the request:
"wholesale_quantity_discount_rule_mapping": [
{
"wholesale_role": "wholesale_customer",
"start_qty": "10",
"end_qty": "15",
"price_type": "fixed-price",
"wholesale_price": "50"
},
{
"wholesale_role": "wholesale_customer",
"start_qty": "16",
"end_qty": "",
"price_type": "fixed-price",
"wholesale_price": "40"
},
{
"wholesale_role": "gold_role",
"start_qty": "5",
"price_type": "percent-price",
"wholesale_price": "20"
}
]
The current behavior of this parameter:

If you provide empty string for the _wholesale_quantity_discount_rule_mapping_ parameter, it will remove the rules set previously
If you provide non-wholesale role keys (regular customer or non-existing roles) for the _wholesale_role_ property, it will ignore that particular rule.
If you provide non-number value for the _start_qty_ property, it will ignore that particular rule.
If you provide non-number value for the _end_qty_ property, it will ignore that particular rule. You are allowed to set the _end_qty_ property with empty value, though.
If you provide value other than 「percent-price」 for the _price_type_ property, it will ignore that particular rule.
If you provide non-number value for the _wholesale_price_ property, it will ignore that particular rule.
The only optional property is the _end_qty_. Leaving it out or set it to empty means the rule will be active when the quantity is higher than _start_qty_.
The quantity discount rules you provide will replace the previous rules set. If you want to add additional rules, don』t forget to provide the existing rules in your request data too.

wholesale_quantity_discount_rule_mapping (Simple Product and Variation)
The wholesale_quantity_discount_rule_mapping parameter is used to set the rules of Product Quantity Based Wholesale Pricing. Please keep in mind the below format is designed for the Simple Product and Variation.
The wholesale_quantity_discount_rule_mapping properties:

Attribute
Type
Description

wholesale_role
string
The wholesale role key

start_qty
integer
The start quantity for the rule to active

end_qty (optional)
integer
The end quantity for the rule to active

price_type
string
The discount rule type. The value should be 「fixed-price」 or 「percent-price」

wholesale_price
integer
The discount price or percentage

The parameter data is formatted like this:
"wholesale_quantity_discount_rule_mapping": [
{
"wholesale_role": "",
"start_qty": "",
"end_qty": "",
"price_type": "",
"wholesale_price": ""
}
]
Example of the request:
"wholesale_quantity_discount_rule_mapping": [
{
"wholesale_role": "wholesale_customer",
"start_qty": 10,
"end_qty": 15,
"price_type": "fixed-price",
"wholesale_price": 50
},
{
"wholesale_role": "wholesale_customer",
"start_qty": 16,
"end_qty": "",
"price_type": "fixed-price",
"wholesale_price": 40
},
{
"wholesale_role": "gold_role",
"start_qty": 5,
"price_type": "percent-price",
"wholesale_price": 20
}
]
The current behavior of this parameter:

If you provide empty string for the _wholesale_quantity_discount_rule_mapping_ parameter, it will remove the rules set previously
If you provide non-wholesale role keys (regular customer or non-existing roles) for the _wholesale_role_ property, it will ignore that particular rule.
If you provide non-integer value for the _start_qty_ property, it will ignore that particular rule.
If you provide string value for the _end_qty_ property, it will ignore that particular rule. You are allowed to set the _end_qty_ property with empty value, though.
If you provide value other than 「fixed-price」 or 「percent-price」 for the _price_type_ property, it will ignore that particular rule.
If you provide non-integer value for the _wholesale_price_ property, it will ignore that particular rule.
The only optional property is the _end_qty_. Leaving it out or set it to empty means the rule will be active when the quantity is higher than _start_qty_.
The quantity discount rules you provide will replace the previous rules set. If you want to add additional rules, don』t forget to provide the existing rules in your request data too.

Using the WWPP REST API
To use WWPP REST API, the endpoints should be based on this URL:
/wp-json/wc/v3/wholesale
So when you want to use the Products endpoint, you will need to access it via /wp-json/wc/v3/wholesale/products.
Create a wholesale product
This API helps you create a wholesale product but not regular product (product that doesn』t have wholesale price). Please note that a variable product doesn』t have wholesale prices property (only the variation), so it』s possible to create a variable product without specifying the wholesale prices.
HTTP request
POST /wp-json/wc/v3/wholesale/products
Example
POST: /wp-json/wc/v3/wholesale/products
{
"name":"Wholesale Product",
"type":"simple",
"regular_price":"150",
"wholesale_price":{
"wholesale_customer":140,
"gold_role":110
},
"wholesale_visibility_filter":[
"wholesale_customer",
"gold_role"
],
"ignore_cat_level_wholesale_discount":"yes",
"ignore_role_level_wholesale_discount":"yes",
"wholesale_minimum_order_quantity":{
"wholesale_customer":5,
"gold_role":10
},
"wholesale_order_quantity_step":{
"wholesale_customer":2,
"gold_role":3
},
"wholesale_quantity_discount_rule_mapping":[
{
"wholesale_role":"wholesale_customer",
"start_qty":10,
"end_qty":20,
"price_type":"fixed-price",
"wholesale_price":100
}
]
}
Retrieve a wholesale product
This API lets you retrieve and view a specific wholesale product by ID. Just like the Create API, it won』t retrieve a regular product.
HTTP request
GET /wp-json/wc/v3/wholesale/products/
Available parameters

Parameter
Type
Description

wholesale_role
string
The wholesale role you want to filter the product with. When a product doesn』t have a wholesale price for the particular role, it will show 「Not a wholesale product」 response.

Example
GET: /wp-json/wc/v3/wholesale/products/123?wholesale_role=wholesale_customer
List all wholesale products
This API helps you to view all the wholesale products. Just like retrieving a specific wholesale product, it won』t retrieve regular products.
HTTP request
GET /wp-json/wc/v3/wholesale/products/
Available parameters

Parameter
Type
Description

wholesale_role
string
The wholesale role you want to filter the products with.

Example
GET: /wp-json/wc/v3/wholesale/products?wholesale_role=wholesale_customer
Update a wholesale product
This API lets you make changes to a product. Currently there』s no restriction when updating a product using this API, so you can update regular products or wholesale products.
HTTP request
PUT /wp-json/wc/v3/wholesale/products/
Example
PUT: /wp-json/wc/v3/wholesale/products/123
{
"name":"Updated Wholesale Product",
"wholesale_price":{
"wholesale_customer":140,
"gold_role":110
},
"wholesale_visibility_filter":[
"wholesale_customer",
"gold_role"
],
"ignore_cat_level_wholesale_discount":"yes",
"ignore_role_level_wholesale_discount":"yes",
"wholesale_minimum_order_quantity":{
"wholesale_customer":5,
"gold_role":10
},
"wholesale_order_quantity_step":{
"wholesale_customer":2,
"gold_role":3
},
"wholesale_quantity_discount_rule_mapping":[
{
"wholesale_role":"wholesale_customer",
"start_qty":10,
"end_qty":20,
"price_type":"fixed-price",
"wholesale_price":100
}
]
}
Delete a wholesale product
This API helps you delete a wholesale product. So you won』t be able to use this API to a regular product.
HTTP request
DELETE /wp-json/wc/v3/wholesale/products/
Available parameters

Parameter
Type
Description

wholesale_role
string
The wholesale role you want to filter the product with. If the product doesn』t have wholesale price for the specific role, the API won』t delete the product.

Example
DELETE: /wp-json/wc/v3/wholesale/products/123
Create a wholesale product variation
This API helps you to create a new wholesale product variation. Like the API to create a wholesale product, it doesn』t allow you to create a regular product variation.
HTTP request
POST /wp-json/wc/v3/wholesale/products//variations/
Example
POST: /wp-json/wc/v3/wholesale/products/123/variations/234
{
"regular_price":"150",
"wholesale_price":{
"wholesale_customer":140,
"gold_role":110
},
"wholesale_visibility_filter":[
"wholesale_customer",
"gold_role"
],
"wholesale_minimum_order_quantity":{
"wholesale_customer":5,
"gold_role":10
},
"wholesale_order_quantity_step":{
"wholesale_customer":2,
"gold_role":3
},
"wholesale_quantity_discount_rule_mapping":[
{
"wholesale_role":"wholesale_customer",
"start_qty":10,
"end_qty":20,
"price_type":"fixed-price",
"wholesale_price":100
}
]
}
Retrieve a wholesale product variation
This API lets you retrieve and view a specific wholesale product variation by ID. This API can』t be used to retrieve a specific regular product variation.
HTTP request
GET /wp-json/wc/v3/wholesale/products//variations/
Available parameters

Parameter
Type
Description

wholesale_role
string
The wholesale role you want to filter the variations with. When a variation doesn』t have a wholesale price for the particular role, it will show 「Not a wholesale product」 response.

Example
GET: /wp-json/wc/v3/wholesale/products/123/variations/234?wholesale_role=wholesale_customer
List all wholesale product variations
This API helps you to view all the wholesale product variations in a variable product. If a variation retrieved is not a wholesale product variation, The API won』t list it.
HTTP request
GET /wp-json/wc/v3/wholesale/products//variations
Available parameters

Parameter
Type
Description

wholesale_role
string
The wholesale role you want to filter the products with.

Example
GET: /wp-json/wc/v3/wholesale/products/123/variations?wholesale_role=wholesale_customer
Update a wholesale product variation
This API lets you make changes to a product variation. Currently there』s no restriction for updating via this API, so you can update both regular or wholesale product variations.
HTTP request
PUT /wp-json/wc/v3/wholesale/products//variations/
Example
PUT: /wp-json/wc/v3/wholesale/products/123/variations/234
{
"wholesale_price":{
"wholesale_customer":140,
"gold_role":110
},
"wholesale_visibility_filter":[
"wholesale_customer",
"gold_role"
],
"wholesale_minimum_order_quantity":{
"wholesale_customer":5,
"gold_role":10
},
"wholesale_order_quantity_step":{
"wholesale_customer":2,
"gold_role":3
},
"wholesale_quantity_discount_rule_mapping":[
{
"wholesale_role":"wholesale_customer",
"start_qty":10,
"end_qty":20,
"price_type":"fixed-price",
"wholesale_price":100
}
]
}
Delete a wholesale product variation
This API helps you delete a wholesale product variation.
HTTP request
DELETE /wp-json/wc/v3/wholesale/products//variations/
Available parameters

Parameter
Type
Description

wholesale_role
string
The wholesale role you want to filter the product with. If the product doesn』t have wholesale price for the specific role, the API won』t delete the product.

Example
DELETE: /wp-json/wc/v3/wholesale/products/123/variations/234
Known Issues And Future Improvements
Here are the known bugs and future improvements we are planning to the API integration:

Unable to create wholesale product without providing the wholesale prices, even though the general/role level discount is set or when the product has wholesale category. When a product has wholesale category or the general/role level discount is set, it should count the product as a wholesale product and allow the creation of it.
Include the calculated wholesale prices (final price including tax calculation) and the generated HTML for the wholesale pricing in the API response

Note
Wholesale products vs regular products
Wholesale products are products that have a wholesale price defined. This wholesale price can be set in some places such as on the product itself, on the category, or on the general settings.
For a product to be called a wholesale product, one of these conditions should be true:

The product has wholesale prices set to at least one wholesale role
The product has category with wholesale discount set
The general/role discount is set in 「WooCommerce > Settings > Wholesale Prices > Discount」

See here for a more complete run down of pricing in Wholesale Suite.

How To Set Up a Minimum Order Requirement

How To Set Up a Minimum Order Requirement

One of the most common strategies for wholesale order is the minimum order quantity or subtotal requirements. It』s a fantastic way to boost the volume of items in an order. Our WooCommerce Wholesale Prices Premium has the feature to set this on your WooCommerce store.
Minimum Order Requirements to ensure that your wholesale customers will not activate wholesale pricing if they don』t meet the requirements yet. Until they meet the requirements, they will see regular prices in the cart along with a notice to tell them how much they need to add before they will activate wholesale pricing.
You』ll find the option to set this in the Wholesale Prices setting. Please navigate to WooCommerce > Setting > Wholesale Prices > General.

Order Requirements Setting (Click to Zoom)

Default Minimum Order Quantity, define a minimum number of items that wholesale customers must reach in the cart before they activate wholesale pricing.
Default Minimum Order Subtotal, Define a minimum subtotal that wholesale customers must reach before they activate wholesale pricing for items in their cart.
You can either use one of them or both, you can set it in the Minimum Order Requirement Satisfaction option.
If you set it to AND, both minimum rules must be met in order for the wholesale customer to get the wholesale price.
If you set it to OR, if one of the minimum rules is met, the wholesale customer will get the wholesale price. 
As these rules applied by default, it』ll apply to all of your wholesale customer roles. If you』d like to lower or increase the minimum rules for a certain wholesale role, you can enable the Wholesale Role Specific Minimum Requirements option.

Wholesale Role Specific Minimum Requirements Override Mapping(Click to Zoom)

When enabled, the mapped wholesale customer role here will get the new minimum order requirement for them as you set in this override.
Related article:
1. How To Use Wholesale Minimum Order Quantity To Boost Volume2. Why Does The Cart Show Retail Prices Until The Minimums Are Met?

How To Force Success Tick Mark To Stay Visible After Add To Cart

How To Force Success Tick Mark To Stay Visible After Add To Cart

If you want to force the tick mark to stay visible after the customer has added an item to cart you can do so with a small CSS tweak.
This can be good for using the tick as an indicator they』ve already added the item to the cart. Note though that it will revert if they search or refresh the page.
Add the following to your custom styles in your theme:
#wwof_product_listing_table .product_row_action .spinner.success {
display: inline-block !important;
}

How To Adjust Visibility Of Wholesale Products

How To Adjust Visibility Of Wholesale Products

Controlling who can see which products in your store is really important once you start selling products wholesale.
This guide will take you through the options for controlling product visibility within your store.
There are currently four main options for controlling product visibility across the store within the Wholesale Suite plugins (primarily speaking about WooCommerce Wholesale Prices Premium and WooCommerce Wholesale Order Form):

The 「Only Show Wholesale Products To Wholesale Users」 global setting
The 「Restrict To Wholesale Roles」 visibility options on products themselves
Making a variation 「Wholesale Only」 on individual variations
The Permissions & Filters settings on the order form

The first two are related to WooCommerce Wholesale Prices Premium but affect all parts of your store (including the related products and the WooCommerce Wholesale Order Form page) and the last applies only to the WooCommerce Wholesale Order Form page.
1. Only Show Wholesale Products To Wholesale Users
This is a global setting which you can find under the Wholesale Prices settings page:

Login to WordPress
Navigate to WooCommerce->Settings
Click on the Wholesale Prices tab
Check the 「Only Show Wholesale Products To Wholesale Users」 option and save

Once this option is saved your store will check the user』s role and if they have a valid wholesale role it will determine if that product should be visible to that user by checking if there has been a wholesale price defined for that product.
This also respects the global % discount and also the product category % discount options (see our advanced wholesale pricing options guide for more info).
2. Restrict To Wholesale Roles
You can also restrict individual product visibility to certain roles only. This is really handy if you have multiple wholesale role tiers and need to restrict the visibility of particular products that get unlocked per role.
You will find this option on the Publish box of your individual products:
Restrict Wholesale Visibility
3. Restrict Variations To Wholesale Only
Have a Variable type product where you just need to make one variation 「wholesale only」?
You can achieve this by making the individual variation a 「Wholesale Exclusive Variation」. It』s as simple as checking a box next to the wholesale roles that should have permission to view this variation.

4. Permissions & Filters Settings in WooCommerce Wholesale Order Form
Our optimized WooCommerce order form plugin gives you the ability to further restrict what wholesale customers see on that page.
First off you can actually restrict access to this page via the user』s role. If they don』t have a role that has permission they will see an access denied screen instead.
Order Form Restrict Permissions
Numerous filters can also be set under the Filters screen in the settings. These include being able to restrict the order form to one particular category and also being able to exclude individual products from the list.
Order Form Filters
Having Product Visibility Problems?
Sometimes if you have used a product importer or bulk management tool you may need to re-initialize the product visibility meta which is used as an indicator for the system to identify which products to show to which users.
See here for instructions: How to re-initialize product visibility meta