Password protect product categories in WooCommerce
In response to popular demand, we have launched a new WordPress plugin called WooCommerce Password Protected Categories. It’s the only plugin which lets you password protect categories in WooCommerce. It’s even possible to create a WooCommerce wholesale site or hide a whole WooCommerce store!
Note: Since launching this plugin, we have added extra functionality and renamed it ‘WooCommerce Protected Categories’. You can still password protect product categories, but you can also restrict categories to specific roles or even individual users. This makes it the most complete WooCommerce category protection plugin on the market.
Why password protect WooCommerce categories?
- E-commerce website with a public shop and a separate wholesale/distributors/B2B area.
- Photographers’ website where each photoshoot is uploaded and made privately available for the individual client to sell.
- Members-only shop that you have to join before making a purchase.
Most WooCommerce websites are entirely available to the public. However with nearly 2 million websites using WooCommerce in 2017, there are also lots of stores that need protected, private or hidden areas.
What does WooCommerce Password Protected Categories do?
WooCommerce Protected Categories adds a password protection option to the WooCommerce Categories page (WooCommerce → Categories in the WordPress admin). It works in the same way as the password protection for pages and posts. You choose a password, and visitors must enter this password in order to access the category page.
Each WooCommerce product category can have one password. Alternatively, you can create multiple passwords for each category. This is useful if you want to create unique passwords for each category, for example.
The great thing about this plugin is that the password automatically protects all the products within the category you have protected. It also protects any sub-categories. This lets you divided up the protected area of your e-commerce store, creating a more complex navigation structure with as many products and sub-categories as you like – all protected by a single password.
The plugin also lets you mark categories as Private, so that only logged in Administrators and Editors can view them. Or if you prefer, you can restrict categories to specific logged in user accounts or user roles. These are all great ways to create WooCommerce private products within a single category.
What did people do before this plugin was released?
Previously, people wanting to create a hidden area for private products within a WooCommerce online shop would use one of the following methods.
Password protect or private WooCommerce products
You can password protect individual WooCommerce products in the same way as you can protect a standard WordPress post or page. You can also create individual WooCommerce private products. Do this via the ‘Visibility’ option in the ‘Publish’ section at the top right of the Add/Edit Product screen.
A password protected product will still appear on your main Shop page and category pages. If someone clicks on it then they will be prompted to enter a password before they can view the product.
With this option, you have to individually password protect every product that you need to hide. Or mark the product as private.
With password protected products, your customers will have to enter a password for every single product. Not very user-friendly.
With WooCommerce private products, they appear to logged in users with the correct privileges but it’s a bit disjointed.
The WooCommerce Protected Categories plugin offers a more sophisticated solution because it includes a setting allowing you to hide products within private or password protected categories from the main Shop page. You can also hide private or password protected categories from your main list of categories. This means that people will only be able to find your protected products or categories if they have the link. (Or if they’re logged in, with WooCommerce product categories.) This lets you have a private area of your WooCommerce shop without cluttering up your public shop pages.
Once a visitor has entered the password for a category, they will be able to view all the products within that category – and also within any sub-categories – without entering any further passwords. This is much more user-friendly than protecting each individual product.
Display products on a private or password protected page
WooCommerce has lots of built-in shortcodes which can be used to display products within a page. Some themes also have options for displaying WooCommerce private products or categories on a standard page.
You can use this to create a standard page in WordPress and password protect it in the usual way or mark it as private. You can then insert the required products onto the page.
The problem with this option is that it’s not very secure as there are various other ways that people can find your products. The ‘hidden’ products will still be visible on your main WooCommerce Shop page which lists all your products – and people can guess the address of this page even if you haven’t added any links to it.
If your hidden products are in the same category as publicly available products then visitors will be able to see the hidden products on the category page. There are probably other loopholes, too.
Restrict content using a membership plugin
For a more fully featured solution, you can create a complete membership site using a WooCommerce membership plugin such as WooCommerce Memberships or Groups (with the Groups for WooCommerce add-on). With a membership plugin, each of your users will have their own login details – as opposed to a shared password for each category.
This is a good option if your users will have access to other protected content, for example a wider members area. It’s also good if any of your WooCommerce categories are particularly sensitive and a shared password isn’t secure enough. However it can be overkill if your requirements are more straightforward than this. WooCommerce-compatible membership plugins are also more expensive. And it’s a pain to have to spend your time helping members who are having problems logging in (yes I know WordPress has a ‘Lost Password’ feature, but owners of membership sites still receive constant enquiries about this.)
If you really want each user to have a separate login then you can create private categories instead of a whole membership plugin. This will automatically unlock your private categories to logged in users depending on their role. It’s much easier than a full membership solution.
If you need to create a private area of your shop then the WooCommerce Protected Categories plugin is a great option. It’s quick and easy to set up, and automatically protects all the products within your private or password protected categories. Simple!
Create a WooCommerce age restricted store
Password Protected Categories is ideal as a WooCommerce age verification plugin. You can use a password protected category to require customers to verify their age before they can view the age restricted products within.
Is it easy to use?
Absolutely, you can literally create WooCommerce private products within a minute or two. You can read the full plugin documentation here. We’ve also provided a detailed video tutorial on using the password protection plugin and marking products as private.
Where can I get the WooCommerce private products plugin?
So you’d like to password protect your WooCommerce categories or make them private! You can buy the plugin from here. It’s much cheaper than setting up a full membership solution and we hope it is useful for making WooCommerce private and protected.
Or if you’d rather protect your entire shop, check out our WooCommerce Private Store plugin instead.
We’ve also created an opportunity to earn money from recommending the plugin. Sign up to our WordPress affiliate scheme and get 30% commission for WordPress plugin sales on our site.