Are you looking for a way to hide products from search in WooCommerce?
Don’t worry, I got you covered here!
WooCommerce allows you to hide products from a search using catalog visibility. It works pretty well, but you’ll need a plugin if you want to hide a product from specific search results and user roles.
So instead of installing another plugin, you can use a single plugin that can help you with both the issues.
In today’s article, I’ll show you the best method to hide products from search in WooCommerce with the help of the WooCommerce Restriction Rules plugin. This plugin will also help you hide products, posts and add advanced protection rules.
Before diving into the tutorial, let’s take a look at the hidden products and the reasons for hiding products from search.
On This Page
- 1 Why Hide Products from Search?
- 2 How to Hide Products from Search in WooCommerce?
- 3 Conclusion
Why Hide Products from Search?
There could be a variety of reasons you may wish to hide WooCommerce products in your online store. Some of the reasons are explained below.
1. Members-only stores
Members-only stores are ones that only sell things to logged-in customers. To put it another way, you must be a registered member to view and purchase things.
2. Private Wholesale stores
You can create a private wholesale store within your existing WooCommerce store. You can sell to both ordinary and wholesale customers by hiding WooCommerce products. Regular consumers will be able to see and purchase the products that they are permitted to see, whereas wholesale customers will only be able to see all or a subset of the products that they are permitted to see.
3. Membership sites
WooCommerce membership sites frequently sell exclusive products in addition to regular (non-member) customers. These could be event tickets, imprinted merchandise, or limited-edition products.
Now that we know some of the reasons or the use cases to hide the products in WooCommerce, let’s dive into the step-by-step process to hide products from search in WooCommerce.
How to Hide Products from Search in WooCommerce?
Follow the following steps to hide the products.
1. Install and Activate the WooCommerce Restriction Rules Plugin
Note: You can skip this step if you have already installed and activated the WooCommerce Restriction Rules plugin.
To install the WooCommerce Restriction Rules plugin, you will need to install the Woosuite Core plugin and activate it with the help of a license key. We have created a Quick Start Guide for you to figure out how to install and activate the WooCommerce Restriction Rules plugin.
Once you have installed and activated the plugin, now navigate to the Woosuite » Restriction Rules from your WordPress dashboard.
Now we need to add the restrictions to some of the products so that they’ll only be visible to the logged-in users or the members.
To do so, expand the Hide Product Rules tab by clicking on the (▾), from the settings of the plugin.
In this tab, you’ll see a few options that will help you hide the products from search results.
4. Select the Audience
We’ll be selecting the audience for which the products will be hidden from the search results.
To select the users, navigate to the “Applies To” dropdown. You’ll get four options:
- Specific Roles
- Specific Users
For this tutorial, I am selecting “Guests” as I want to hide the products from guests only. You can select depending upon your need and choice.
5. Filter the Products
Now from the “Filter By” field, select the products you want to hide from search. You can filter products by:
I have selected the “Product”. Once you select any filter, you’ll see a new field below it.
As I have selected the “Product” filter so I can see the field below from where I can select the individual products.
I have selected 2 products that I want to hide from the search results of guests. You can also select multiple products and add multiple product rules.
6. Save the Changes
Once you have created the rule, now click on the “Save Changes” button at the top right corner of your screen to save all the settings.
7. Final Results
Now let’s test the rule.
To test it, I visited my store as a guest and when I searched for the wine product, I couldn’t see any of the products that I hide from the search results of guest users.
And now when I logged into my site as a regular customer and searched for the wine product, I was able to see all the wine products in my shop.
It means our rule is working. I also tested it by logging in to the store as different user roles and the results were the same.
Now you know the best and the simplest method to hide WooCommerce products from search results and search engines.
Instead of using the default method to hide products in your WooCommerce store, you can use the WooCommerce Restriction Rules plugin to hide the products and do more advanced customizations.
Let me know in the comments which method are you using to hide the products and why? Also, if you have any queries, you can ask them in the comments or contact our customer support. Our dedicated customer support team typically replies within 48 hours.
Ready to get started? Download the WooCommerce Restriction Rules plugin today!