How To Apply Surcharge Fees Or Discounts Per Payment Gateway

How To Apply Surcharge Fees Or Discounts Per Payment Gateway

If you』re looking for an option to add a surcharge or a permanent discount for your wholesale customers for the usage of a particular payment gateway, we have a feature on our WooCommerce Wholesale Prices Premium extension that supports this so you can easily charge them or give a discount.
Simply go to our settings on WooCommerce > Settings > Wholesale Prices > Payment Gateway.
You should find the Wholesale Role/Payment Gateway Surcharge settings. Then select the wholesale role, which Payment Gateway this will be applied, add the Surcharge Title, set the Surcharge Type and enter the Surcharge Amount.
Please note that you can enter a negative amount to give discount instead of a surcharge.

If you want to override this setting per individual user, we also support per user Payment Gateway Surcharge/Discount.
Just go to your Users > All Users dashboard and edit the user you want to override their the surcharge/discount settings.
There, you』ll find the Override Payment Gateway Surcharge field and you have three options that you can select:

Use general wholesale role payment gateway surcharge
Do not use general wholesale role payment gateway surcharge
Specify payment gateway surcharge

WooCommerce Wholesale Lead Capture Getting Started Guide

WooCommerce Wholesale Lead Capture Getting Started Guide

Wholesale Lead Capture

Thank you for purchasing WooCommerce Wholesale Lead Capture!
This document is a getting started guide for the WooCommerce Wholesale Lead Capture plugin for WooCommerce. 
One of the biggest admin headaches of running a wholesale business is recruiting and managing wholesale level customers. And beyond the headache side of things, you probably also want to deliver a 5-star experience to your new wholesale customers. After all, they』re important to your business so it makes sense to ensure they experience a great onboarding.
Here』s what this guide will cover:

Overview – we describe at a high level what the plugin does exactly
Review Important Pages – we will review the important pages that the plugin creates
Registration Form – let』s talk about how to modify the default registration form and how to add custom fields if you need them
Post-Registration Actions – these features will tell the system what to do with customers after they』ve registered
Approvals & Emails – a quick overview of how the approvals system works and what emails are sent to the customer
Spam Protection – your form has built-in honeypot anti-spam protection but we』ll show you how to use Google Recaptcha as well if your site requires extra protection
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 Lead Capture is a completely stand-alone plugin for WooCommerce that manages wholesale customer registration, wholesale login, a complete approvals process, and onboarding emails. It』s designed to work hand in hand with the rest of our suite of tools.
There are tons of features included in the Lead Capture tool, you can see here for a full list, and even though the tool does much of the heavy lifting for you, creating the necessary forms and pages, we』ll also go over just a few major things so that you can get up and running as fast as possible.

Subscribe to Wholesale Suite

First, we』re going to review the important pages that the lead capture tool creates when you activate it.
Review Important Pages
Right out of the gate the lead capture tool creates a number of pages on your website to help you manage wholesale customers.
These are:

https://[yoursiteurl]/wholesale-log-in-page/ – this is the Login page for wholesale customers
https://[yoursiteurl]/wholesale-registration-page/ – this is the Registration page for wholesale customers
https://[yoursiteurl]/wholesale-registration-thankyou-page/ – this is the default Registration Thank You page wholesale customers see after registering

You don』t need to create these manually, but you can grab the shortcode from those pages and use them on another page if you wish.
The shortcodes used are:

Wholesale Log In Page[wwlc_login_form]
Wholesale Registration Page[wwlc_registration_form]

In the settings you』ll also see that there are some page settings, this will point you to the current page set for those pages.
You will also notice a few other pages on the settings screen to be set such as the terms & conditions (these are linked to when you have the Terms & Conditions field enabled) and various thank you pages and redirection pages.
Make sure you have a page selected for each of these settings.
Registration Form
The registration form is where your new leads register to apply for a wholesale user account.
We recommend you collect all the information that you need right at the time of registration, that way you can choose whether to approve or deny them based on that information without having to go back and forth too much to figure it out.
Built-In Fields
The system comes with a number of default fields that you can enable/disable as you please.
These include:

First Name (required)
Last Name (required)
Phone (required)
Email
Username
Company Name
Address
Password

You can rearrange these using the field priority and toggle them on/off. Required fields cannot be toggled off.
As much as possible, the fields are used to prime the user account with information so that when they go to the checkout on their first order, they won』t have to fill it in again.
Custom Fields
Custom fields let you collect any other information you need to make a decision about whether to accept this lead as a wholesale customer.
You can add fields of various types:

Text
Text Area
Number
Email
URL
Select
Radio
Checkbox
Hidden
File
Content
Terms & conditions

People use these to collect all sorts of information, some examples being tax/vat numbers, company registration documents, website URLs, communication preferences, etc.
Post-Registration Actions
Post-registration actions are the things that happen after the person submits the registration form. The two main things are choosing how user approvals should work and what user role the person should get post-approval.
1. User Approval
Should users be approved before getting access or not? This is something that you have the freedom to fully automate or do manually.
If you choose to do approvals manually you』ll get the most control. The system will email you when someone is pending approval and an Administrator or Shop Manager will need to approve that person.
If you choose to have automated approvals the customer will be granted access straight away and be able to see wholesale pricing and place an order.
2. Automatically Granting A User Role
On approval, the system will need to grant the customer a user role.
If you are using WooCommerce Wholesale Prices, the default here is the Wholesale Customer role. But you can change this to any of the other roles on your site.
Approvals & Emails
As mentioned, approvals can be completely automated if you wish.
This means that the administrator will not have to approve users before they can see wholesale pricing and place an order.
Some store owners like to have a bit more control than that with their wholesale program so the default is manual approvals.
During the user onboarding process there are several emails that get sent to the admin and to the customer:
Scenario #1: Auto approval is turned OFF

User registers
Account set to inactive
Admin receives email of new registration
User receives email confirming their registration
Admin approves the new user manually
Account set to active
User receives email that their account is active which contains their credentials

Scenario #2: Auto approval is turned ON

User registers
Account set to active
Admin receives email of new registration and that it has been auto-approved
User receives email confirming their registration
User receives email that their account is active which contains their credentials

All emails can be edited and customized via the Email sub-menu in the settings. Here is some more information about the user approval flow and how to edit emails.
If you experience any issues with emails not sending then we highly recommend checking out our email troubleshooting guide.

Approval Emails Customization

Spam Protection
Your registration form is protected automatically out of the box with honeypot anti-spam functionality.
However, if you have experienced a spam issue in the past you may also wish to look at some additional protection with a Google Recaptcha field. 
You』ve probably seen these boxes around the web where the user has to check a box to indicate that they』re human and sometimes they ask you to pick out all of the traffic lights or school buses in a picture.
So although there is already great anti-spam protection automatically on your registration form, Lead Capture is fully compatible with Google』s Recaptcha technology as well for the sites that need extra protection.
You can get your Recaptcha API keys by registering for one here and these can be installed under the Security sub-menu in the plugin settings.

Wholesale Registration Form Security

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 Prices Premium

WooCommerce Wholesale Prices Premium Plugin

Premium is the add-on for the free plugin and immediately it opens up a lot of extra features that will give you maximum flexibility.
Additionally, some countries require certain specific rules to be followed when selling and advertising pricing to wholesale customers and Prices Premium has been designed to cater to everyone.
Top Feature Highlights:

Unlimited number of additional wholesale roles
Set prices via global % or category % in addition to the product level pricing
Tax exemption based on user role which is flexible enough to cater for even the most stringent tax policies
Shipping mapping where to can force wholesale customers to use certain methods and you can restrict certain shipping options to only wholesale customers
Payment gateway mapping where you can force wholesale customers to use certain gateways and likewise restrict certain gateways to only wholesale customers
Adjust the visibility of products to be wholesale only, retail only or a mix. This lets you adjust variation visibility as well
Add minimum purchase rules so you can enforce your wholesale agreements on the order level and set sensible minimums on the product level

These are just a few of the hundreds of features inside the premium add-on.
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.
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 Override Login & Registration Form Templates

How To Override Login & Registration Form Templates

The WooCommerce Wholesale Lead Capture plugin gives your wholesale customers a great way to register and login to the wholesale side of your website.
But sometimes you might need to customize the layout of the registration or login forms or do other layout tweaks to take what the plugin offers even further.
That』s where template overrides come in.
The Lead Capture plugin lets you override its templates in much the same way as WooCommerce itself does, so those that are familiar with WooCommerce』s template overriding will find this just as simple.
To override a template file:

Navigate to the /wp-content/plugins/woocommerce-wholesale-lead-capture/templates/ directory
Copy the .php file you wish to override
Paste the file in your theme under a directory called 『woocommerce』. This should look something like: /wp-content/themes/your-theme/woocommerce/[template file to override].php

The plugin will search your theme and detect these overrides and use them over the bundled plugin versions.
Keep in mind, when you update the plugin, sometimes template files will need to be updated to keep up with the latest features.

How Do I Stop Wholesale Users From Seeing Retail Only Products?

How Do I Stop Wholesale Users From Seeing Retail Only Products?

Once you have created your store, it』s likely that you will have a mix of retail and wholesale products.
With WooCommerce Wholesale Prices Premium you can control the visibility of products to wholesale customers.
This includes the ability to hide non-wholesale products, essentially meaning that if a product doesn』t have a wholesale price defined it will be hidden from wholesale users once they』re logged in.
To find this setting:

Login to WordPress
Click on WooCommerce->Settings
Click on the Wholesale Prices > General
The first setting under the Wholesale Product options is the 「Only Show Wholesale Products To Wholesale Users」 option


If this setting is activated your wholesale users will only see products where a wholesale price has been set.

Missing Products when switching to a different language using WPML

Missing Products when switching to a different language using WPML

You』ve translated all of your products into other languages. However, some products aren』t available in those languages immediately.
Our wholesale price field and all of its supporting fields are custom fields. To be able to translate custom fields, you need to set them as 「translatable」 in WPML. Please navigate to the WPML -> Settings page, clicking on the Multilingual Content Setup tab, and scrolling to the Custom Field Translation section then set all of the wholesale price-related custom fields to Copy. It』ll copy the value of wholesale prices related fields to other languages as well.
For your reference, please read the following documentation: https://wpml.org/documentation/getting-started-guide/translating-custom-fields/
After doing this, please reset the visibility meta by going to WooCommerce -> Settings -> Wholesale Prices tab, click on Help in the sub-menu under the tabs and then press the Re-Initialize Product Visibility Meta button.
This button resets all the product visibility metadata so your product visibility options are properly respected.

How to remove the theme shortcodes appearing on the Lightbox Popup

How to remove the theme shortcodes appearing on the Lightbox Popup

The lightbox popup is a feature of the WooCommerce Wholesale Order Form, where the lightbox is generated when the product is clicked in the order form instead of redirecting it to the product page.

It copies the content of the product description and displays it in the lightbox. However, it is common for popular theme builders like Visual Composer, Divi, and others, to use shortcodes in the editor but they don』t provide support the content displayed in our lightbox pop-up. This is why shortcodes are not executed and only the styling shortcodes are displayed.
The best workaround for this is by modifying the lightbox pop-up to display the short description instead of the default product description.
To do this, you will have to modify the template file wwof-product-details.php line 55 on woocommerce-wholesale-order-form/templates/.  For reference on how to edit the order form templates, please click here.
You should find this line of code:
echo do_shortcode( wpautop( $product_post_data->post_content ) );

Please replace it with the following code:
echo nl2br("nn",false);
echo do_shortcode( $product_post_data->post_excerpt );

This way, you don』t have to worry about the extra shortcodes displaying on your lightbox popup!

How to Sort the Order of the Products in the Wholesale Order Form

How to Sort the Order of the Products in the Wholesale Order Form

If you want to arrange your products on the Wholesale Order Form on a certain order, we have a setting on WooCommerce > Settings > Wholesale Ordering > General, where you can find the Product Sorting and Product Sort Order options.
Let』s explain the Product Sort Order first. In this setting, you can choose whether you want the order to be Ascending or Descending. Ascending order means it will arrange the products from lowest to highest. Descending order will sort the products from highest to lowest. Please keep in mind that the Product Sort Order setting is dependent on what Product Sorting option you have chosen.
Product Sorting Option
Now, let』s go to Product Sorting settings. This is the primary setting on how to choose the order of your products in your Wholesale Order Form. Currently, we have 5 options to choose from and these are the following:

Default Sorting – sort products based on the sorting order in your Products listing page or Products > All Products page. You can click the Sorting settings and manually drag your products to the order you want. This is the ideal sorting for fewer products and if your products are created and arranged properly in your Products > All Products > Sorting.
Custom Ordering (menu order) + Name – this is the go-to option if you want to have more customized ordering on your Wholesale Order Form. You can set the Menu order in the Advanced tab of your product settings. After adding the menu order in your product, the Custom Ordering option will use this to sort your products.
Name – if you want your products to be sorted alphabetically, choosing the Name option will easily arrange the products based on its name.
Sort by Date – this option will sort your products based on the date the product is created.
SKU – it might be handy for some to arrange their products based on their stock-keeping unit. Choosing the SKU option will help them display their products based on their SKUs.

How to Hide Prices For Not Logged In Customers/Guests

How to Hide Prices For Not Logged In Customers/Guests

Some shop owners would like to hide the prices in their shop from guests users to make it exclusive for logged-in customers only, such as your wholesalers.
Unfortunately, we don』t have this feature in our plugins by default. But fortunately, there is an easy workaround to do this by using the custom snippet below:
 
add_action( 'init', 'wwp_hide_price_add_cart_not_logged_in' );

function wwp_hide_price_add_cart_not_logged_in() {
if ( !is_user_logged_in() ) {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
add_action( 'woocommerce_single_product_summary', 'wwp_print_login_to_see', 31 );
add_action( 'woocommerce_after_shop_loop_item', 'wwp_print_login_to_see', 11 );
}
}

function wwp_print_login_to_see() {
echo '' . __('Login to see prices', 'theme_name') . '';
}

 
Just simply to add this snippet to your theme/child theme』s functions.php or you can also use the Code Snippets plugin to add this to your site.

How to Hide Unused Wholesale Price Settings on the Product Backend

How to Hide Unused Wholesale Price Settings on the Product Backend

Our WooCommerce Wholesale Prices Premium automatically adds a number of extra fields to your product edit screens which can take up quite a bit of room on the interface. For example, the Wholesale Minimum Order Quantity, Wholesale Order Quantity Step and Product Quantity Based Wholesale Pricing fields.

These fields are here so you can properly configure the sales conditions for your product, however, some users might not be using one or more of these pricing features in their wholesale shop at all.
If you want to declutter/hide those unused wholesale prices settings on the product backend, simply modify the snippet below to adjust which wholesale pricing feature that you want to hide from your product settings. Then put it to your theme or child theme』s functions.php file. This will hide those features on the backend interface.
add_action('admin_head', 'hide_wws_product_settings');

function hide_wws_product_settings() {
echo '
/*Wholesale Minimum Order Quantity*/
.wholesale-minium-order-quantity-options-group{
display:none!important;
}
/*Wholesale Order Quantity Step*/
.wholesale-order-quantity-step-options-group{
display:none!important;
}
/*Product Quantity Based Wholesale Pricing*/
.product-quantity-based-wholesale-pricing{
display:none!important;
}
';
}

How To Hide Wholesale Suite Meta On The Order Edit Screen

How To Hide Wholesale Suite Meta On The Order Edit Screen

Due to the way WooCommerce handles and shows metadata, you』ll find our Wholesale Suite data present on the WooCommerce > Orders page.

These bits of data are harmless and you can simply ignore them. But if you want to hide them from your view, you can hide them by inserting this custom snippet to your functions.php.

add_action('admin_head', 'wws_hide_ws_meta');

function wws_hide_ws_meta() {
echo '
#order_line_items tbody th{
display:none;
}

#order_line_items tbody p{
display:none;
}
';
}

If you』re a developer and are interested in further inspecting how WooCommerce handles metadata, you can check this file: woocommerce/includes/class-wc-order-item-product.php.