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.

Products Are Not Showing On The Shop When Wholesale Prices Premium Is Activated

Products Are Not Showing On The Shop When Wholesale Prices Premium Is Activated

Having issues with some of your products not showing on the shop page when WooCommerce Wholesale Prices Premium is active? There are two common causes.
1. Broken Product Visibility
Our plugin has a great feature to set a product』s visibility for wholesale and non-wholesale customers.
However, sometimes when you import your products via an import tool, the product visibility meta of our plugin is not set properly, which is why there』s no product that is displayed on the Shop page. This is because during import, the save routine is not run for each and every product and that is when the product visibility meta is set.
The simple fix for this is to go to your WooCommerce > Settings > Wholesale Prices > Help, and click on the Re-Initialize Product Visibility Meta.
You can run this as many times as you need and we suggest running it after each import.
You can also check this article for further reference.
2. Wholesale Visibility Setting
Sometimes, a misconfiguration of our Wholesale Role Filter setting is the culprit for the missing products in your shop. This mainly affects your non-wholesale users or guests.
To check, go to your Products > All Products and edit the product to check the Restrict To Wholesale Roles if there』s a specific wholesale role it is applied. If the individual product doesn』t have a role restriction, you can proceed to check the Product Category next.
Go to your Products > Categories and edit the category to check the Wholesale Role Filter. If you find a wholesale role it is restricted to, it means that all products under that category will be hidden from other users. Most of the time, the Wholesale Role Filter in the category settings is often unnoticed, which is why products don』t appear on your shop page for guests.
You can learn more about our Visibility feature by going to this article.
3. Still not working?
If your products don』t appear on the shop page and you have tried both of the above tips and you are still encountering issues,  you might need to do some basic debugging. Please try disabling your other plugins and switching your theme to a default WordPress theme, to check if there』s a plugin/theme that produces this issue. We recommend doing this on a staging environment and please also ensure you have taken a backup of your website before proceeding.
If you are still encountering issues with the visibility of your products even after doing the methods above, please reach out to our friendly support for further assistance.

How to Apply a Different Tax Rate to Wholesale Customers

How to Apply a Different Tax Rate to Wholesale Customers

In some cases, you may want to have a different tax rate specific for your wholesale customer roles. This could an incentive, for example, lowering the tax rate compared to the regular customer or to comply with a specific regulation in your country.
We have made this possible in our WooCommerce Wholesale Prices Premium by introducing the Wholesale Role / Tax Class Mapping. It allows you to specify tax classes per wholesale role.
You can find this options in WooCommerce > Settings > Wholesale Prices > Tax:

Simply select the wholesale role, then choose which tax class/rate he/she will get. You can change the tax class anytime later.
We recommend creating a special test user with your tax class role to let you test and ensure that things are working the way you want them to be. If it』s mapped correctly you should see that this user will have a  different tax rate applied to their wholesale prices.

Can I Display Wholesale Prices Excluding Tax Throughout The Store?

Can I Display Wholesale Prices Excluding Tax Throughout The Store?

Some countries to show wholesale pricing excluding tax and as such our plugins support showing wholesale prices throughout the store including or excluding tax.
We built this option into the WooCommerce Wholesale Prices Premium plugin and it gives you the flexibility to adjust how your prices are shown throughout the store. This particular feature is also compatible with the WooCommerce Wholesale Order Form plugin as well.
To tweak the setting:

Login to WordPress
Click on WooCommerce->Settings
Click the Wholesale Prices tab
Click on the Tax settings page and you will find the 「Display Prices in the Shop」 setting which controls whether prices are shown Excluding Tax or Including Tax

display-prices-ex-tax
Note this applies only for wholesale prices and which are visible only to authorised wholesale users.

How to tax exempt a wholesale role

How to tax exempt a wholesale role

Sometimes when you run a store with multiple roles you will need to make a special wholesale role for some customers that is tax exempt. This can be useful for ensuring those users are never taxed regardless of the country they are in.
In WooCommerce Wholesale Prices Premium we have made this quite easy to achieve by introducing tax exemption mapping. This allows you to map the tax status to any of your wholesale roles (click here to learn how to add extra wholesale roles).
You will find these settings under WooCommerce->Settings, Wholesale Prices tab, then click on Tax in the submenu.
Tax Exemption per wholesale user role in WooCommerce
 
Simple select the wholesale role, then choose whether it should be exempt or not. Feel free to map only the roles that are tax exempt or if you want to be explicit you can map them all.
We recommend creating a special test user with your tax exempt role to let you test and ensure that things are working the way you want them to be. If it』s mapped correctly you should see that this user will have no tax applied to their wholesale prices.

How To Map Multiple Shipping Methods Within The Same Region

How To Map Multiple Shipping Methods Within The Same Region

The Issue:
A common issue regarding Wholesale Role/Shipping Method Mapping is when you have multiple shipping methods with the same region. If you have that setting, the shipping zone in the higher order will override the other one and this causes the shipping method mapping to not be applied properly.
For example, you want to have a Flat Rate shipping method for retail customers and Free Shipping for wholesale customers in the United States.
Multiple shipping zones with the same region, incorrect way
The Solution:
Instead of having them separated, combine all the Shipping methods with the same Region as shown in the picture below. This way, the Wholesale Role/Shipping Method Mapping can be applied properly.
The correct way of having multiple shipping methods in the same region
For additional reference, please visit the link to learn more on How To Restrict Wholesale Customers to Using Particular Shipping Methods.

How To Add Min Quantity On Archive Pages By Adding A Quantity Selector

How To Add Min Quantity On Archive Pages By Adding A Quantity Selector

By default the archives pages in WooCommerce (Categories, Tags and even the main Shop page archive) do not display a quantity selector and have hard coded the add to cart buttons to a quanitty of 1.
This is fine for retail situations, but for wholesale customers it can be confusing when there is a minimum quantity amount on that particular product and the price doesn』t match up in the cart due to not satisfying this rule.
The best way to get around this is by adding a quantity box to your archive pages. The WooCommerce Wholesale Prices Premium plugin will then pick up on this and adjust the minimum quantity to the amount you defined in your product.
Here』s a quick guide on how to override your loop/add-to-cart.php template to achieve this:
https://docs.woothemes.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons/
Now you should see quantity selectors next to your add to cart buttons and when logged in, your wholesale customers will see the correct min quantity pre-filled in those boxes.

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 Set A Lower Minimum Threshold Or Lower Wholesale Prices For The First Order

How To Set A Lower Minimum Threshold Or Lower Wholesale Prices For The First Order

When your wholesale customer first signs up you may wish to provide them with some incentive pricing on their first order.
This can take many forms such as:

Lower initial pricing on products
Lower % discounts on pricing
Lower minimum order thresholds
Different shipping/payment gateway options (or free shipping incentives)

The following code snippet lets you change the wholesale user role to a different user role after the first order.
For this to work, you need WooCommerce Wholesale Prices Premium and must create a new wholesale role under WooCommerce->Wholesale Roles called 「Wholesale First Order」 with the slug 「wholesale_first_order」.
With the WooCommerce Wholesale Lead Capture plugin you can automatically set the desired wholesale user role on registration approval. So if you』re using this plugin, also remember to change this setting to point to your new Wholesale First Order user role.
Here』s the code to add to your functions.php:
function wwsChangeUserRoleAfterFirstOrder( $order_id ) {
if ( !isset( $order_id ) )
return;

$old_role = 'wholesale_first_order';
$new_role = 'wholesale_customer';
$order = new WC_Order( $order_id );
$order_user_id = $order->get_user_id();
$order_user = new WP_User( $order_user_id );

// If user is not a guest
if ( $order_user ) {
// If the user is sitting at 1 or more orders and the user has the old
// user role, then change the user role to the new role
if ( in_array( $old_role, $order_user->roles ) && wc_get_customer_order_count($order_user->ID) >= 1) {
wp_update_user( array(
'ID' => $order_user->ID,
'role' => $new_role
) );
}
}

}

add_action( 'woocommerce_order_status_completed', 'wwsChangeUserRoleAfterFirstOrder', 10, 1 );

Explanation: On Order completion, checks the Customer attached to the Order to see if they have the 「Wholesale First Order」 user role and if they also have 1 or more Orders in the system.
If this is the case then it changes the Customer』s role to the 「Wholesale Customer」 user role.
You can tweak the user role names in the code above and you could even increase the Order count if you wish (you might only want to change them over after 10 orders for instance).
NOTE: Now that you have two Wholesale user roles you will need to fill in wholesale pricing for both wholesale roles so the first user role sees the correct wholesale pricing as well.
This also opens up the door to change the wholesale minimum thresholds for this user role as well (either the Order thresholds or the individual Product minimum quantity thresholds).

How Do I Add Additional Wholesale User Role Tiers?

How Do I Add Additional Wholesale User Role Tiers?

In WooCommerce Wholesale Prices Premium you get the option of defining multiple-tiers of wholesale user roles so you can control tiered pricing depending on their commitment level.
Adding additional wholesale user roles is simple:

Login to WordPress
Navigate to WooCommerce->Wholesale Roles
The interface should feel pretty familiar to adding things like categories – but this time you』re adding wholesale user roles to the system.
Add your roles on the left hand side by providing a name for the user role and a key (usually just the name, replacing the spaces with dashes – ). We recommend keeping the names short, like Bronze, Silver, Gold, etc.
You can also rename the built-in user role if you wish.

Tiered Wholesale Roles