This post isn’t for those WooCommerce store owners.
Instead, I’m going to talk about a more niche use – password protecting certain WooCommerce product categories to restrict access.
Why the heck would you want to password protect WooCommerce categories? There are actually plenty of situations where it makes sense. Here are a few that come to mind right away:
- Wholesale stores – if you’re a wholesaler, you probably don’t want your prices and product lists publicly available, so password protection lets you restrict access to only authorized shoppers.
- Private client areas – you can create separate categories for individual clients to sell a unique set of products to each client.
- Members-only store – 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 protect certain restricted products that you don’t want everyone to be able to see.
In this post, I’ll talk about how you can use the WooCommerce Protected Categories plugin from Barn2 Media to accomplish all these uses (and anything else you can think up!).
Here’s What WooCommerce Password Protected Categories Does
WooCommerce Password Protected Categories is a premium plugin that lets you add password protection to one or more of your WooCommerce product categories.
On the surface, that might seem pretty simple…
But there’s actually some neat stuff going on under the hood:
- Individual products in the category are 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 (just not accessible without the password).
- Once a customer enters the password, all the products in that category are automatically unlocked – there’s no need to re-enter the password.
- You can use a single sign-in page for all customers. Customers will automatically be taken to the relevant category based on the password that they enter.
Doesn’t WooCommerce Already Let You Do That?
Not really! I mean, you can add a password to individual WooCommerce products using the core WordPress Visibility control.
That’s totally fine if you literally just need to restrict access to a single product. But it’s not really solving the same problem that WooCommerce Password Protected Categories solves because:
- You have to restrict each product individually, which is a massive pain if you start getting into 10+ products.
- You can only use a single password for each product, rather than giving each person a unique password.
- There’s no single sign-on option.
Essentially, WooCommerce Password Protected Categories offers a solution that is both:
- More flexible
- Less time-consuming
And that’s a pretty nice combined value proposition.
How WooCommerce Password Protected Categories Works
Ok, so now you have a good idea of what WooCommerce Password Protected Categories helps you do.
But how does it actually work on your WooCommerce store?
Let’s run through it quickly…
Once you install and activate the plugin, the first thing that you’ll want to do is configure some basic settings.
WooCommerce Password Protected Categories Basic Settings
You can access the plugin’s settings by going to WooCommerce → Settings → Products → Password Protected Categories.
Here’s everything that the plugin lets you configure:
Category visibility – choose whether or not to show password protected categories/products in:
- Your store
- Your navigation menus
- Password Expires After – choose how many days the category will remain unlocked after a user enters the password.
- Category Prefix – add a “private” designator before a category on the category page and in menu items.
- Client Login Page – (optionally) designate a single sign-in page for your clients. Remember – you can use a different password for each person and they’ll be automatically redirected to the relevant category.
Finally, you can also configure the text and styling of your Password Form:
How To Password Protect WooCommerce Categories
Once you’ve configured the plugin’s basic settings, it’s time to actually start restricting some categories!
To do that, you go to the actual WooCommerce product category area (Products → Categories).
Now, when you create a new category or edit an existing category, you’ll get a new Visibility option:
If you choose the Password protected option, you’ll be able to add one or more passwords for the category (you can also choose the Private option to just make categories private).
The ability to add multiple passwords is helpful because it lets you give each client or user their own password. To add an additional password, all you have to do is click the Plus icon:
Once you’re finished adding passwords, all you need to do is save your changes to start password protecting the category.
What It Looks Like For Visitors Trying To Access A Protected Category
Now that you’ve password protected a category, anyone who tries to access it will see something like this:
You can, of course, customize this form with your own text and CSS styling.
Once that person enters a valid password, they’ll be able to browse the category and all its products like normal:
As I showed you in the settings, you can also opt to create a single sign-in page for all your clients.
This page is built using a shortcode, so you can insert it anywhere you want, even in page builders that support shortcode usage:
Remember, with this sign-in page, users will be automatically redirected to the relevant category for the specific password that they entered. For example, if you have a situation where:
- PasswordA links to CategoryA
- PasswordB links to CategoryB
- Anyone who enters PasswordA will get redirected to CategoryA
- Anyone who enters PasswordB will get redirected to CategoryB
This feature is especially helpful if you want to create different client areas because it lets you reuse the same login page for all of your clients.
Final Thoughts & Pricing
If you need an easy-to-use solution to password protect product categories on WooCommerce, you should definitely give WooCommerce Protected Categories a look. It will save you a ton of time and eliminate the need to custom code a solution.
How much will that convenience cost you? It depends on how many sites you plan to use the plugin on:
- 1 site – $75
- 5 sites – $135
- 20 sites – $275
So basically, it costs the equivalent of ~one developer hour, which means it will almost certainly cost less than getting something custom coded.
Do you have any neat uses for password-protecting WooCommerce products? Let us know in the comments!