You can retrieve the license keys for your plugins at any time via the Licenses page in your My Account area on our site.
This page will show you the active licenses you have for your products and their expiry date.
From here you can also choose to renew or upgrade your license for each product.
A valid, non-expired license is required to retrieve updates and support for the plugins.
If you have any questions about licensing please contact us.
Author 诗语
Compatibility fix for WooCommerce Color or Image Variation plugin
The WooCommerce Color or Image Variation plugin is a popular WooCommerce extension found on CodeCanyon.
It lets you create colour or image selectors for each of your variations with relative ease.
We recently debugged and fixed a compatibility issue with this plugin where the minimum order quantity would not pre-populate in the quantity box.
The fix is to install this small snippet of code into the functions.php of your theme:
function wwppColourImageMinVarFix($variationData) {
global $current_user;
if (isset($current_user) && class_exists('WWP_Wholesale_Roles')) {
$wwp_wholesale_roles = WWP_Wholesale_Roles::getInstance();
$wwp_wholesale_role = $wwp_wholesale_roles->getUserWholesaleRole();
if (!empty($wwp_wholesale_role)) {
// Get min qty for this variation
$product_id = $variationData['variation_id'];
$wwpp_wholesale_prices = WWPP_Wholesale_Prices::getInstance();
$wholesalePrice = $wwpp_wholesale_prices->getProductWholesalePrice( $product_id , $wwp_wholesale_role );
$wholesalePrice = apply_filters( 'wwp_filter_wholesale_price_shop' , $wholesalePrice , $product_id , $wwp_wholesale_role );
$minimumOrder = get_post_meta( $product_id , $wwp_wholesale_role[0] . "_wholesale_minimum_order_quantity" , true );
if ( $minimumOrder && $wholesalePrice )
$variationData['min_qty'] = $minimumOrder;
}
}
return $variationData;
}
add_filter('woocommerce_available_variation', 'wwppColourImageMinVarFix', 10, 1);
Can I Order On Behalf Of My Wholesale Customers?
Unfortunately, due to the way the WooCommerce core admin interface is currently coded, it makes it quite difficult for WooCommerce Wholesale Prices and Premium to modify the pricing on the fly for backend manual orders in WooCommerce.
We do however have a valid workaround which is to use the very good User Switching plugin by John Blackbourn. This plugin lets you assume the identity of another user on the site and do handy things like placing orders for them in WooCommerce.
One of our favourite suggestions is to use this in combination with the WooCommerce Wholesale Order Form plugin which makes for a very speedy and efficient ordering process that is fast enough to use over the phone.
Hope this helps!
How to Disable the Redirection of the Registration Page to My Account Page when user is logged in
By default, logged in users that view the Wholesale Registration Page will be redirected to the My Account page. This because the user is already logged in and it prevents the existing customers accidentally registering another user account.
But, if for some reason you want to let people see the registration form again (even though they』re already registered and logged in), you can remove this redirection to the My Account page using the custom snippet below (put it on your functions.php):
$wwlc_user_account = WWLC_User_Account::instance();
remove_action( 'wp' , array( $wwlc_user_account , 'registration_page_redirect_logged_in_user' ) );
Be aware that this will not show the fields of the Wholesale Registration page. Instead, they will see their name and the logout button and they will still need to log out if they want to register for another user account.
How To Add A Heading Before The Quantity Based Discounts On The Order Form
The Wholesale Order Form is specifically designed for a streamlined ordering process to make it as fast as possible for existing wholesale customers to order from you.
When using the Order Form with Prices Premium, you』ll find that the details of the Quantity Based Discounts are shown directly under the regular price in a very simply styled table.
A few people have asked if it』s possible to add a heading prior to the quantity discounts table to indicate to new wholesale customers that they can order more and get a further discount.
Here』s a snippet of code which adds a small heading before the quantity discounts table and gives you a CSS class 「wholesale-quantity-discount-heading」 to style it with.
Just add the following to your functions.php in your theme:
function addQuantityDiscountsHeading($html) {
$html = str_replace('
- ', '
Quantity discounts available:
- ', $html);
return $html;
}
add_filter('wwof_filter_product_item_price', 'addQuantityDiscountsHeading', 10, 1);
Javascript conflict with UpdraftPlus
[notification type=」alert-info」 close=」false」 ]NOTE: This conflict has been resolved as of WooCommerce Wholesale Prices Premium 1.6.4, please see the changelog for details.[/notification]
We were recently notified of a javascript conflict which effects the function of a popular backup plugin called UpdraftPlus.
The issue is that UpdraftPlus uses a lot of AJAX calls and CRON calls in it』s general function and as such we should not be attempting to load our javascript files during those calls.
You can easily get around the issue by pasting the following code in your theme』s functions.php:
function fixWWPPUpdraftConflict() {
if (DOING_AJAX || DOING_CRON) {
global $wc_wholesale_prices_premium;
remove_action('admin_enqueue_scripts', array( $wc_wholesale_prices_premium, 'loadBackEndStylesAndScripts' ));
}
}
add_action('init', 'fixWWPPUpdraftConflict', 99);
How to translate the Access Denied page with WPML
In order to create a translation for the Access Denied Message, you will need to create a wpml-config.xml file and put it inside your site』s /wp-content/plugins/woocommerce-wholesale-order-form/ root folder.
Please copy the code below and save it as wpml-config.xml
Afterward, you should be able to create a translation for the Access Denied Message using WPML by following the steps below:
First, create the translation for the order form page
Go to WPML > Theme and plugins localization
Select WooCommerce Wholesale Order Form under String in the plugins
Click Scan selected plugins for strings
Go to WPML > String Translation
Choose the selection in Select strings within domain
Choose admin_texts_wwof_permissions_noaccess_title for the title translation and later after saving choose admin_texts_wwof_permissions_noaccess_message for the message translation
Click 「translations」 in the list (on the right)
Put the translation for the other languages there
Enable *Translation is complete*
Click Save
It should now show the correct translation when you switch language in your site』s front end.