How to Create a Private WooCommerce Category The Easy Way

If you purchase through a link on our site, we may earn a commission. Learn more.

Need to create a private WooCommerce category that only authorized users have access to? With the right tools, you can make one or more categories on your store completely private. Then, you can either give automatic access to certain user roles that you specify or give users a password that they can use to access the private category.
Table of Contents
WP Engine High Performance Hosting
BionicWP Hosting

Need to create a private WooCommerce category that only authorized users have access to? With the right tools, you can make one or more categories on your store completely private.

Then, you can either give automatic access to certain user roles that you specify or give users a password that they can use to access the private category.

This comes in handy if you need to create a:

I’ve already shown you how to create password protected WooCommerce categories. Now, I’m going to give you a tutorial on how to adopt the same plugin to creating a private WooCommerce category.

WooCommerce Password Protected Categories Lets You Create A Private WooCommerce Category

To create a private WooCommerce category, you’ll need the WooCommerce Protected Categories plugin from Barn2 Media.

Basically, the process works like this:

  • You use the WooCommerce Password Protected Categories plugin to make one or more WooCommerce categories private
  • Then, you use the free User Role Editor plugin to assign the capability to access those categories to certain user roles.

Once a category is private, it’s completely hidden from your store, along with all products in that category. Note that, unless you take further steps, direct links to individual products will still work. More on this later.

Of course, you can always add password protection instead of making the category private in this way, If you’d prefer to use password protection instead of restricting access by user role, read this post for a tutorial specifically on that subject.

WooCommerce Protected Categories

Create private categories on your WooCommerce store.

Buy Now

How To Create A Private WooCommerce Category

To get started, make sure that you have the WooCommerce Password Protected Categories plugin installed and activated on your WooCommerce store.

Then, you’re ready to jump in!

Step 1: Make Category (Or Categories) Private

Once you have the plugin installed, you can make categories private by going to Products → Categories in your WordPress dashboard.

There, you can either:

  • Create a new category that you want to be private
  • Edit an existing category to make it private
edit woocommerce categories

The interface is the same for both options.

At the bottom of the interface, you should see a section for Visibility. In that section, select the radio box for Private:

create a private woocommerce category

Now, if you look at your list of categories, you should see that specific category marked as Private, which helps you remember which categories are public vs private:

category visibility

And if an unauthorized user tries to access that category on your store, they’ll see a message like this:

example of what people see

Additionally, that category, and all the products and subcategories inside of it, will be hidden from all parts of your store, including navigation menus.

Step 2: Create New User Role To Access Private Categories

By default, the only people that can see your private categories are users with the user roles of:

  • Administrator
  • Shop Manager

For some uses, that might be enough. But if you want to allow other people to access your private categories, you’ll probably want to create a separate, more limited, user role that you can use for those people’s accounts.

For example, you could create a “Private Category Shopper” user role that you assign to those users that only gives them access to the private WooCommerce categories, but not any other permissions. Or, you could always utilize the existing WordPress Subscriber role, depending on your needs.

Read this post if you’re confused about what user roles are.

To create a new user role, you can use the free User Role Editor plugin.

Once you’ve installed and activated the plugin, go to Users → User Role Editor in your WordPress dashboard.

Then, click the button to Add Role:

user role editor interface

Give your role a name, like “Private Category Shopper”, and then click Add Role.

Optionally, you can choose to Make copy of the existing WooCommerce Customer role if you want to ensure your new user role has all those same capabilities plus access to private categories:

create a new user role

And now you have a new user role called Private Category Shopper!

Step 3: Add Relevant Capabilities To New User Role

Right now, the new user role that you just created doesn’t have permission to do…anything (or, it might be an exact copy of the Customer role if you chose to make a copy).

Let’s fix that!

To give the new user role permission to access your private WooCommerce categories, check the boxes for:

  • read
  • read_private_pages
  • read_private_posts
  • read_private_products

Then, click the Update button:

add new capabilities

If needed, you can add other capabilities as well. But those four alone will give that user role access to the private categories.

Step 4: Create Or Edit User Accounts For Your Private Shoppers

Now, to give access to your private categories to certain users, you can assign them the role of Private Category Shopper when you create or edit their WordPress user account:

assign user role

As long as the users are logged in, they’ll now be able to see all of your private categories.

You Can Also Make Individual Products Private

As I mentioned at the beginning, the method above makes the categories private and hides all the products in those categories from all parts of your store.

But…if someone were to get their hands on a direct link to a product in a private category, they could still access that specific product.

While this is probably a rare situation, there is a solution if you’re worried about it happening:

Use the core WordPress Visibility feature to make individual products private:

make individual products private

Users with the proper role will still be able to view the individual private products, but it will ensure that no one else, not even someone with a direct link, will be able to view the product.

Follow a Video Tutorial

Here’s a video from Barn2 that explains all this again, in case you prefer watching a video to reading.

Wrapping Things Up

WooCommerce Protected Categories is an easy-to-use solution if you need to create private categories on your WooCommerce store. Remember, all you need to do is:

  • Install and activate the plugin
  • Mark specific categories as private
  • Optionally, create a new user role and add capabilities to give certain users access to your private categories

WooCommerce Password Protected Categories can also be used to create password-protected WooCommerce categories in addition to completely private categories. And, if you’d prefer to make your entire WooCommerce store private, the same developers offer a separate WooCommerce Private Store plugin.

Have any other questions about how to create a private WooCommerce category? Leave a comment and we’ll try to help out!

Colin Newcomer

Colin has been using WordPress for over a decade and is on a quest to test all 60,000+ plugins at WordPress.org. He has been a Writer and Product Review Expert for WP Mayor since 2017, testing well over 150 products and services throughout that time.

Discover more from our archives ↓

Popular articles ↓

One Response

  1. Is it possible to bulk create many private categories and related products. I need this for schoolphotography in Europe White every student has his category.

Share Your Thoughts

Your email address will not be published. Required fields are marked *

Claim Your Free Website Tip 👇

Leave your name, email and website URL below to receive one actionable improvement tip tailored for your website within the next 24 hours.

"They identified areas for improvement that we had not previously considered." - Elliot

By providing your information, you'll also be subscribing to our weekly newsletter packed with exclusive content and insights. You can unsubscribe at any time with just one click.