BUILDING A WHOLESALE STORE?

Check out our new plugin, WooCommerce Wholesale Pro - designed specifically for wholesale.
View Plugin

Password protect product categories in WooCommerce

August 14, 2020 12 comments

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. 

WooCommerce Protected Categories
Start hiding areas of your WooCommerce store today.

Why password protect WooCommerce categories?

WooCommerce Private Products pluginThere are several reasons why you might want to password protect a category or create WooCommerce private products. Here are some popular examples:

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.

Related tutorial: How to create WooCommerce private products.

What does WooCommerce Password Protected Categories do?

WooCommerce Private Products WordPress pluginWooCommerce 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 Private Products WP pluginWooCommerce 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.

WooCommerce Protected Categories
Start hiding areas of your WooCommerce store today.

Katie Keith

An active member of the global WordPress community, Barn2 Co-Founder Katie loves collaborating with other plugin companies. Her articles have been published on high profile sites including WPTavern, Torque and IndieHackers. She oversees all plugin support and deals with 'Tier 2' support requests about how to use Barn2's plugins in advanced ways.

12 Comments

  1. Joshua
    December 18, 2018 Reply

    can this do 1 time generated pass keys that expire in 24 hours

  2. Alex Elkjær
    October 16, 2018 Reply

    Hi
    I have 4 categories that are password protected: A - B - C -D
    In these categories I have made different passwords for my clients
    In each category there are different products.

    The problem is if I want my clients to see different products from ex. category A and B or A and D the "Order" buttom disappears in the shop.

    I also wants my clients to see a total list of all products in the "password protected" shop from the categories, beneath each other on one side ex. "www.yourdomaine.com/business", with a different password for each client:
    Categori A (list of products)
    Categori B (list of products)
    Categori C (list of products)
    Categori D (list of products)

    How to do this?

    Best regards Alex

    • Katie Keith
      October 16, 2018 Reply

      Hi Alex, thanks for providing such clear information.

      A client can only be logged into one password protected category at a time. That's why when they enter the password for one protected category, they can no longer order products from the other protected categories that they have previously unlocked.

      Do each of your clients have their own user account on your website? If so, then you'd be better off using the 'User' protection that comes with our plugin instead of password protected categories. This way, you would select which specific clients/users can access each category. Each client will unlock ALL their categories simply by logging into their user account, so they won't need to worry about having a separate password for each category. When they are logged into their account, they will be able to see all the protects that they have access to on the main Shop page.

      For example, you might have Clients 1, 2, 3 and 4; and Categories A, B, C and D. You could restrict Category A to Clients 1 and 2, and Category B to Clients 1, 3 and 4. Each logged in client would only see the products in the categories that you have given them access to.

      This will be more flexible for you than password protected categories.

  3. krishna
    May 12, 2018 Reply

    i am creating product with the REST API and via "default" way...
    i only want to display those product that i created via "default" way (usual create product in wordpress) in the frontend view....
    product that i created via REST API i Don't want to display those in frontend but in backend it's fine
    how can i do that ?

    • Katie Keith
      May 12, 2018 Reply

      Hi Krishna, you could use our WooCommerce Password Protected Categories plugin to create a password protected category that is hidden from public view. Alternatively, you can create a private category which is only visible to administrators in the front end. Either way, assign products to this category when you create them via REST API. When you add products using other methods, put them in different categories that are public.

  4. neil
    April 26, 2018 Reply

    Hi Katie,

    I provide customised products for individual customers, In order to prevent the general public from purchasing the products I password-protect them and then place them in a visible category.
    The customer is informed, locates the product and is meant to enter the password (that I have given them) and complete the purchase.
    However, the customer has issues releasing the product for purchase
    They are promoted for a user account.
    The customer is asked to create a user account in the normal fashion with a different password than the one I have used to protect the product. Still no joy - just a time out
    I have asked the customer to create a user account with the SAME password as the one I have used to protect the product. Still no joy - just a time out.
    The only way the customer can purchase the product, is if I delete the product password and ask the customer to then quickly complete the purchase.
    I am the site owner but have no coding experience. If there is a setting to be activated, the I could do
    Any tips?
    thanks Neil

    • Katie Keith
      April 27, 2018 Reply

      Hi Neil, thanks for using our plugin. The problem is that WooCommerce Password Protected Categories uses its own password protection, which does not integrate with individual user accounts. To access their category, you need to give each customer the password for their category. They can then visit the central category login page, enter their password, and they will automatically be directed to the page containing their hidden products. It doesn't matter whether or not they are logged in because they will need to enter the password for their category anyway.

      I don't know why your customers are seeing a blank screen when they login, as user registration is a standard WordPress function (not part of our plugin). If it's not working then it might be that you are using a front end login/registration plugin which isn't working properly. You could try deactivating plugins and testing the user registration form to see where the conflict is coming from. However, this won't help people to log into their password protected category because it is separate from the category protection.

      You're welcome to email me if any of this isn't clear. I will send you an email anyway to make sure you see this reply.

      • neil
        April 27, 2018 Reply

        Hi Katie,

        thank you so much for the response. It seems my explanation was lacking clarity, The visible category isn't password protected ... only the product. I will pursue the matter as suggested, de- and reinstalling the plugins. Much appreciated

        • Katie Keith
          April 27, 2018

          Hi Neil, if the password protected category is showing on the public parts of your site (e.g. the main shop page), then you need to untick the two 'Category Visibility' boxes on the plugin settings page. This will hide them so that they are only visible after someone enters the password to unlock that category.

  5. Marcelo Juarez
    February 19, 2018 Reply

    Hello, I am creating a store with products published by different people, my question is if each product can have a password so that the owner of the product can edit the price of that product.
    Thank you

    • Katie Keith
      February 20, 2018 Reply

      Hi Marcelo, I don't know of any plugins that work exactly as you have described, but a multivendor plugin might be closest to what you need as vendors can edit their own products. I recommend the official WooCommerce Product Vendors plugin.

Please share your thoughts...

Your email address will not be published.