Why Do Products Not Show In Regular Searches When Prices Premium Is Active?

Why Do Products Not Show In Regular Searches When Prices Premium Is Active?

WooCommerce Wholesale Prices Premium has a feature to restrict products exclusive to wholesale customers. However, due to technical limitations, the regular search of WordPress doesn』t filter these restrictions on the products.
It can be confusing to guests and other users to see products that are restricted to them that』s why we disable showing products on the regular search to prevent confusion.
If we didn』t do this, then your guest customers might see wholesale restricted products in their regular search results. Though, even if they did click on one of these restricted products, they would just be redirected to the shop as they don』t have the authorization to view the product page.
However, if you don』t mind your wholesale products showing up to non-authorized users in search query results pages you can re-add products to the regular listings using this snippet. Note that visibility is ignored, they』ll just see all products regardless of wholesale visibility.
function include_product_search( $query ) {
if ( !is_admin() && $query->is_search() && (!isset($_GET['post_type']) || $_GET['post_type'] != 'product') ){
$post_types = $query->get('post_type'); $post_types []= 'product'; $query->set( 'post_type', $post_types );
}
}
add_action( 'pre_get_posts', 'include_product_search' );
The preferred solution is instead of using the regular search, we recommend using WooCommerce』s Product Search widget which is compatible with the wholesale role restrictions.

How To Use A Custom Price Suffix For Wholesale Users

How To Use A Custom Price Suffix For Wholesale Users

When setting up tax, some countries require you to show a non-inclusive price for your wholesale customers while still keeping an inclusive price for regular retail customers.
It』s pretty common to set the Price Suffix setting to something like 「Inc. VAT」, 「Inc. GST」 or even 「Inc Tax」, but when you have the wholesale prices showing throughout the store as the non-inclusive price this might need to change for those users only.
We are planning on adding this feature to our WooCommerce Wholesale Prices Premium plugin in the future, but in the meantime, this can be achieved by putting the code snippet below into your functions.php file in your theme.
function fixWholesalePriceSuffix($price_display_suffix) {
global $current_user;

if (isset($current_user) && class_exists('WWP_Wholesale_Roles')) {
$wwp_wholesale_roles = WWP_Wholesale_Roles::getInstance();
if (!empty($wwp_wholesale_roles->getUserWholesaleRole())) {
return ' ex. GST';
}
}

return $price_display_suffix;
}

add_filter('woocommerce_get_price_suffix', 'fixWholesalePriceSuffix', 10, 1);

Simply replace 『 ex. GST』 with the string of your choice and this will only be applied for wholesale users.

How to Fix the Security Check Fail in the Wholesale Registration Form

How to Fix the Security Check Fail in the Wholesale Registration Form

When you encounter a Security Check Fail on the Wholesale Registration Form, this issue is usually caused by a caching plugin.
Kindly check if you have a caching plugin installed. If yes, you need to exclude the Wholesale Registration Page from the caching rules or temporarily deactivate the plugin to check if this will resolve the issue.
Also when testing, please clear the browser cache or test it using a private or incognito mode on your browser.
Another thing to consider is if your hosting implements a caching feature on their server. WPEngine, Flywheel, and Kinsta are some of the popular hosting companies that implement server caching. If your host implements it, you』ll need to contact your hosting provider to exclude the Wholesale Registration form page from the caching rules.
If you are still running into problems even after disabling the cache, feel free to reach out to our friendly support team for advice.

Multi Vendor Plugin Compatibility

Multi Vendor Plugin Compatibility

Unfortunately, we don』t have an integration with any multi-vendor plugins at the moment. But we』ve run some quick tests with a few plugins and some of our features like the wholesale pricing and minimum order restrictions are supported and working properly. However, we can』t fully guarantee that all other features are supported.
Also, please keep in mind that adding wholesale prices is only accessible through the backend, where our default settings are located. This means that vendors, who add their own products on the front end, must have access to the backend to use our WooCommerce Wholesale Prices Premium features.
If you wish to add the wholesale prices fields in the frontend, I』m afraid that this will need extensive code customization.
We suggest asking for further assistance from a developer. And if you』re interested to hire one, we recommend someone from Codeable.

Fancybox issue on Order Form page when Instagram for WordPress installed

Fancybox issue on Order Form page when Instagram for WordPress installed

A small conflict exists between WooCommerce Wholesale Order Form and the Instagram for WordPress plugin (found on WP.org here).
The issue is to do with how fancybox is queued and the two plugins appear to clash, producing a JS error that can disable parts of the form.
The work around is easy enough, just pop the following code into your functions.php file in your theme:
add_action( 'wp_enqueue_scripts', 'dequeue_wwof_fancybox', 99 );
function dequeue_wwof_fancybox() {
wp_dequeue_script( 'wwof_fancybox_js' );
}

Wholesale Prices Settings Page Is Redirecting To The Site』s Homepage: WordPress Firewall 2 Compatibility

Wholesale Prices Settings Page Is Redirecting To The Site』s Homepage: WordPress Firewall 2 Compatibility

If your website is redirecting to the home page when you click on the Wholesale Prices tab in your WooCommerce settings, this is likely caused by an incompatibility with the WordPress Firewall 2 plugin by Matthew Pavkov.
You can test this by disabling the WordPress Firewall 2 plugin temporarily and visiting the Wholesale Prices tab in your WooCommerce settings which should now appear properly.
This plugin is known to cause conflicts with lots of other plugins as well as ours and since it hasn』t been updated in a very long time we recommend switching to a more compatible solution.
For a better, more compatible solution, we recommend switching to Wordfence which gives the same functionality and more.
Download it here:

Wordfence Security – Firewall, Malware Scan, and Login Security

How to Redirect Customers after Log in or Sign out

How to Redirect Customers after Log in or Sign out

You can easily redirect your customers to a certain page after logging in or signing out.
Simply go to WooCommerce > Settings > Wholesale Lead > General, and set the Log In Redirect Page and Log Out Redirect Page.

Please note that the login redirect only applies when you use the Wholesale Login Page of WooCommerce Wholesale Lead Capture, it will not redirect users if they login via your My Account page or other means.

How to Fix Missing Wholesale Roles

How to Fix Missing Wholesale Roles

Unfortunately, we do not have a single specific reason why wholesale roles might disappear.
In many cases, this is related to the use of a third-party user role editing plugin which suddenly removes the wholesale roles in the WooCommerce > Wholesale Roles setting.
Before you proceed: We strongly advise to backup your site and database before doing anything.
There are two ways to fix this issue:
1. Move your current wholesale users temporarily to a certain role using a third party User Role Editor plugin, then delete the wholesale role that was missing. Then re-create it again on WooCommerce > Wholesale Roles and re-apply the newly created role back to your users. This is the safest way to bring back the wholesale role and ideal if you have a few users.
2. If you have a backup of your site where your wholesale roles are still present, go to the Dashboard, then adjust the URL to point to /wp-admin/options.php. Find the wwp_options_registered_custom_roles. This meta key contains serialized data for the wholesale roles that you have. Copy its value from the backup site to the existing site and it should put the missing wholesale roles back.
Remember: editing via the options.php page is risky if modified incorrectly. So if you don』t know what you』re doing here, we suggest you contact a developer.

Product Search Issue With WooCommerce – Search By SKU Plugin

Product Search Issue With WooCommerce – Search By SKU Plugin

The WooCommerce – Search By SKU plugin is a plugin found on WordPress.org that allows search by SKU on both backend and frontend.
However, we have reported conflicts with this plugin due to the way it extends the search functionality by creating a custom loop which doesn』t apply our loop filtering.
Products that are restricted to wholesale roles in the backend show up in search results for non-wholesale users on the front end.
However, when you click through to the single product page you will get redirected back to the shop page as part of the visibility restrictions we enforce.

How to Install and Activate the Plugins for Multisite

How to Install and Activate the Plugins for Multisite

WordPress Multisite allows you to create a network of sites on a single WordPress installation. And if our plugins are installed and running on a Multisite, then it』s important to know how to properly activate and update them.
Installation On Multisite
To install the Wholesale Suite plugins, the Super Admin must install the plugins on the Network site. This will make the plugins available to all of your subsites.
Then go to your Settings > WWS License to activate your licenses.
Afterwards, you can freely deactivate the plugins on your Network site if you don』t need them there and only activate it to the subsite where you need them to.
Updating The Plugins In A Multisite Environment
When updating the plugins, simply go to the Network site and activate the plugins to get the new update notice. Once they are updated on the Network site, the plugins should also be updated on all of your subsites as well.
License Requirements For Multisite
Please note that you must have an Agency level license to activate the plugin and to receive continuous updates for a multisite environment.