No doubt, WooCommerce is the most versatile eCommerce platform in the web development industry. You can use WooCommerce to develop just about any type of eCommerce experience imaginable.
WooCommerce product categories are no different. In this post, we will show you how to keep WooCommerce categories hidden by locking them with passwords using PPWP Pro and its PPWP Access Levels extension.
Password protected product categories isn’t a prominent feature among WooCommerce stores, nor is it a default option of WooCommerce, but you would be amazed by how useful it can be.
Whether you need to sell wholesale products to a specific group of users, create members-only products or even make free products available to users after they take specific actions, this is one of those unique features that can have a significant impact on your company’s business strategy.
- What are WooCommerce Protected Categories?
- Why Should You Password Protect WooCommerce Categories
- How PPWP Pro and Access Levels help
- Doesn’t WooCommerce Provide You with This Facility?
- How to Password Protect WooCommerce Categories
What are WooCommerce Protected Categories?
A WooCommerce protected category means that a user can’t access specific categories or their products unless he has the correct and proper permissions. This category is also known as a private or restricted category.
In any case, a protected category means that to have access to WooCommerce, the user must either:
- Enter a password
- Be logged in
- Have a specific user role
Why Should You Password Protect WooCommerce Categories?
The question here is why you would want to password protect WooCommerce categories. There are plenty of situations where you need to password protect WooCommerce categories, and here are some of them.
- Wholesale stores: If you are working as a wholesaler, you probably don’t want your prices & products list publicly available, so password protection helps in restricting access to only authorized shoppers.
- Private client areas: You can create separate categories for individual clients to sell a unique product to each client.
- Members-only store: With the help of password protected categories, you can create an entire store that’s only available to members.
- Mix-and-match: You can leave most of your store “public” like normal, but password protects some restricted products that you don’t want everyone to be able to see.
How PPWP Pro and Access Levels help
Password Protect WordPress Pro and the Access Levels extension allow you to add password protection to one or more of your WooCommerce product categories easily. It might seem pretty simple to some, but actually, there’re a lot of things behind password protecting WooCommerce categories.
- Protect the entire WooCommerce Product category page at once with a single password form.
- Each product in the category is also password protected, in case someone gets their hands on a direct link to a product.
- You have the option to completely hide your password protected categories or still have them publicly listed.
- Once a customer enters his password, all the products in that particular category are automatically unlocked – there is no need to re-enter the password.
- You can grant content access based on levels. In other words, you can allow users to access different private content according to their password levels. Higher-level passwords will be able to access the same or lower-level content.
Doesn’t WooCommerce Provide You with This Facility?
The answer is “Not really”, you can add a password to individual WooCommerce products with the help of core WordPress Visibility control.
That’s perfect if you need to restrict access to a single product. However, it is not solving the same problem that PPWP Pro and its Access Levels extension do, because:
- You can’t protect the entire category at once.
- You need to restrict each product individually, which is quite hectic if you start getting into 10+ products.
- You can use only a single password for every product, rather than giving each person a unique password.
Importantly, PPWP plugins provide a solution that’s more flexible and less time-consuming.
How to Password Protect WooCommerce Categories
From the above discussion, you get an idea of what PPWP Pro and its Access Levels extension help you do. But how does it work on a WooCommerce store? Let’s find the answer now!
After installing and activating the plugins, the first and foremost that you will want to do is configure some basic settings. Upon activation, the plugin and its extension will be added directly to your WordPress admin navigation menu.
You can access the plugin’s settings by going to Password Protect WordPress > Access Levels sub-menu.
When you’re there, simply follow the steps below to password protect your WooCommerce product categories.
Step 1: Click Add New Base and provide the base name as well as a description.
Step 2: Edit the levels.
Step 3: Select Products from the Post Type dropdown. Then choose all the categories you want to protect with passwords.
Note that Products does not display under the Post Type option by default. In order to protect Products, you need to add it to the Post Type Protection option under PPWP Pro settings page first.
Step 4: Arrange the levels for these categories. For example, “Cat B” has a higher level than “Cat A.” By default, categories that do not belong to any level will be assigned level 0, the lowest level.
Step 5: Once done, go to the Add New Password tab. Here you will insert your password and other information such as password level and password type in the box.
As a result, higher-level passwords can unlock all products at the same or lower-level categories. Global passwords permit all user roles to access the private categories.
What it Looks Like to Visitors Trying to Access a Protected Category
Now that you have password protected a category in WooCommerce, anyone who tries to access it will see something like this on his screen.
Note: You can customize this form via WordPress Customizer and CSS styling.
Once you enter a valid password, you will be able to browse the category and all its products as normal.
How to Hide Protected WooCommerce Categories from Search Engines
There’s no proper way to hide protected WooCommerce categories or products from search engines. However, you can use the “Yoast SEO” plugin to set individual product categories to “noindex” to prevent them from being indexed, which should prevent them from appearing in search engines.
You can hide protected WooCommerce Categories by navigating to Products > Categories > Edit Category (for whichever password-protected category you want to hide from search engines) > Yoast SEO Meta Box > Settings.
And then select ‘No’ for the setting labelled “Allow search engines to show this category in search results?”
Those are the basics of password protected WooCommerce categories. Once you password protect certain categories, all products belonging to them will be automatically protected with the same password as well.
What’s more, the same protection will apply to new posts created for products in a protected category. In case you want to restrict WooCommerce categories to certain users, you can set up access levels for different product categories too. Users with passwords of higher level categories will be able to unlock lower level ones with ease.
If you’re interested in protecting your entire WooCommerce store and product pages, check out our article!