How to create password protected WooCommerce categories
You can password protect a WooCommerce category as follows:
- Go to Products -> Product Categories.
- Click the option to either add a new category or edit an existing one.
- In the ‘Visibility’ section above the ‘Add New Product Category’ button, select ‘Password protected’ and enter the password. You can add anything you like here.
You can password protect as many of your WooCommerce categories as you like, and leave others public.
Each category can have one or more passwords. To add more passwords for a category, click the plus (+) icon next to the password box and add a new row for each additional password. Enter the passwords in the white boxes.
You can click the minus (-) icon to delete a password.
Password protecting sub-categories
You can create more complex navigation structures by password protecting a category and adding ‘child’ categories to it. You can do this by adding a new category in Products -> Product Categories and selecting your password protected category as the ‘Parent’.
The password for the main ‘parent’ category will automatically apply to all its child categories so you don’t need to protect each one individually. This means that when a user tries to view the main parent category, a child category or any of the products within these categories, they will be promoted for the same password. Once they have entered the password, they will automatically have access to all these WooCommerce categories and their products.
Password protecting an whole WooCommerce store
If you want to password protect your whole WooCommerce store then you can do this with WooCommerce Password Protected Categories. Or if you prefer, you can use our dedicated plugin WooCommerce Private Store which has extra features such as hiding all your WooCommerce content from search engines and sitemaps.
How to protect your entire store using WooCommerce Password Protected Categories
- Create a main category for your store in Products -> Product Categories and password protect it. You can then structure your store by adding sub-categories and products. You don’t need to protect any of the individual sub-categories or their products as they will automatically be protected with the same password as the main category.
- Go to WooCommerce -> Settings -> Products -> Password Protected Categories and untick the boxes that show the protected categories and products in the public-facing store and menus.
Can I add a product to more than 1 category?
Each product can only be in one password protected category, otherwise it creates a conflict between the different passwords. Similarly, you can’t have the same product in a public AND a protected category, as it will automatically be protected if you do this.
We recommend that you structure your store with this in mind. For example:
- If your products need separate passwords, then you will need to duplicate them (The Duplicate Post plugin makes it easy to duplicate WooCommerce products.)
- If you need to add the same product to multiple categories and are happy for them to share a password, then you can create a main password protected category with several subcategories. If you leave the subcategories set to ‘Public’ then they will automatically be protected with the same password as the parent category. This lets you add products to as many categories within this section as you like, and they will all be protected with the same password.
Will my protected categories be hidden from search engines?
Please note that WooCommerce Password Protected Categories does not affect how search engines view your categories or products.
There are some steps you can take to hide your protected WooCommerce content from search engines:
- Use an SEO plugin such as Yoast SEO to mark the categories and products as ‘noindex’. This will prevent them from being indexed at all.
- If your Catalogue Visibility settings are set to hide your protected categories and products from the public areas of your store, then search engines are unlikely to crawl them because this only happens if a search engine can find them. However, there may still be links to your protected categories and products elsewhere, such as your XML sitemap, so it’s worth noindexing them if you are concerned about this.
If you want to hide your entire store then the safest option is to use the WooCommerce Private Store plugin instead.