How to create private categories in WooCommerce

noah naf 573835 unsplash

Sometimes, as crazy as it seems, you don’t want to sell your products to just anyone. Of course, you’re in business to make money but there are times when you want to protect your products, only allowing certain customers to purchase them. In this article I’ll look at how you can protect your WooCommerce products by category.

If you want to find out more about making specific products private, read this post.

WooCommerce members only products

Why make WooCommerce categories private?

Yes. Good question. I looked at some common reasons for making some or all your WooCommerce products private in this post. In essence, these include:

  • Incentives: you might want to hold back some of your most desirable products, only making them available to certain customers as an incentive. This helps create an aura of exclusivity or scarcity and, psychologically speaking, things that are more difficult to acquire often become more attractive. You can find out more about the psychology of scarcity in marketing in this article.
  • Differential pricing: if you’re running a members only or subscription site, you might want to give your members a more favourable price than you offer your non-members.
  • Staff-only: possibly you’ve got some products or items that aren’t available to the general public

Private categories

These aren’t the only reasons to protect your WooCommerce products. You can see more here. But why specifically look at protecting categories rather than products?

Hopefully, the answer should be pretty clear: having one or more private WooCommerce categories means you can protect multiple products in one hit. So, using one of the examples above, if you have a section of your website reserved for your staff, you can allocate staff apparel or specialist equipment according to the product category, then mark the entire category or categories as private.

Protecting products by category makes life simpler for you. I developed the WooCommerce Members Only plugin to make it easy to protect WooCommerce products.

WooCommerce Members Only featured image

WooCommerce Members Only

Protect your content and sell members-only products

Find Out More

What about ‘hidden’ products?

WooCommerce has a ‘hidden’ product feature that you can use to remove products from archive and shop lists. This works fine as far as it goes but it’s not a suitable method to prevent these products being accessed. There are a couple of ways that users could still access hidden products:

  • Products will still be indexed by search engines
  • Products can still be accessed by a direct link

There is a big difference between products in protected categories and hidden products. If you want to truly protect your protects, using the ‘hidden’ product setting is inadequate.

The WooCommerce Members Only plugin, on the other hand, will completely remove products from restricted categories from any archive page so that they’re completely invisible to users who don’t have access permissions.

Different methods of restricting access to WooCommerce categories

Members Only has three different ways to protect your categories:

  • Log in status: use this method if you only want to display protected categories to users who are logged in
  • Password: use this method if you want to add a password form to protected content
  • User role: use this method if you want to protect categories from some user roles, but allow others to access it
WooCommerce protected categories settings

Just use the ‘Restriction Method’ to select which method you want to use.

Restrict WooCommerce categories to logged-in users only

This is the simplest way to protect certain categories. If you select ‘Logged In’ as the restriction method, only users who are logged in will be able to access the restricted categories and products.

If the user is not logged in, they’ll be redirected to a page of your choosing.

Password protect WooCommerce categories

Password protecting your categories allows you to create one or more passwords that you can distribute to users as you wish. Any user who tries to access a restricted product will be presented with a password form.

WooCommerce password protected categories

What about ‘password protected’ posts?

Yes, it’s true that WordPress itself provides a setting out of the box for you to password protect posts (and therefore products). In the ‘Publish’ panel of your product, click the ‘Edit’ link next to ‘Visibility’.

Product visibility panel

You can opt to make a product password protected. However, there are two big drawbacks to this:

  • You need to apply this product by product. It’s fine if you only want to password protect one product but it doesn’t work for multiple products or by category
  • You can only have one password per page. With the Members Only plugin, you can create multiple passwords

Protect categories by user role

The third restriction method is ‘User role’. Select this option and you’ll get a new field allowing you to specify which user roles can access your protect categories.

members only user role

This works fine with a user role plugin if you need to create new user roles.

Specifying which categories to protect

Once you choose ‘Specific Categories’ in the ‘Restricted Content’ field, you’ll get a new setting where you can enter the categories that you’d like to make private.

WooCommerce protected categories

Just enter the categories here and they’ll be magically hidden from any users who don’t have your permission to view them.

Create a tease for your customers with protected products

With Members Only, you can choose to hide completely any products within protected categories. Or, you can display them as ‘teases’, showing your customers that these products exist, they’re just out of reach unless you’re a member, or logged in, or in possession of the right password. This is a great way to incentivise your customers.

You’ll notice that there is a ‘Hide Products in Archive’ setting under the list of restricted categories. If you select this, any private products will not be displayed on the shop page or in any archives.

WooCommerce hide products

However, if you leave it deselected, protected products will still be displayed in the shop and archive pages but when the customer clicks through to the product page, they’ll be redirected to the password form.

With a small dash of CSS, you can add a banner or teaser image over any protected products:

WooCommerce members only products

More about WooCommerce Members Only

The Members Only plugin is incredibly simple to use but allows you to do some powerful stuff with your WooCommerce store. You can check it out by clicking the image below.

WooCommerce Members Only featured image

WooCommerce Members Only

Protect your content and sell members-only products

Find Out More

Leave a Reply

Your email address will not be published. All fields are required.