There are times when you would want to protect some products in your WooCommerce Store. Maybe you want those products to be member exclusive or want to unlock them after your users take certain actions.
That may seem hard to achieve for an average user, but if you use WooCommerce Password Protected Categories plugin, you will be able to lock down entire product categories in your WooCommerce store. It’s ideal for managing private wholesale areas, selling customer-specific products, and much more.
If you are planning to add member only category, you can quickly protect it with the help of this plugin. This way, when a member signs up, you can give them the password to purchase the protected products.
WooCommerce Password Protected Categories
The plugin is well integrated with WooCommerce installation and runs from the WooCommerce settings.
Once you install and activate the plugin, your WooCommerce category edit screen will have a new Visibility option where you can set the category as Public, Password Protected or Private. Once you select the password protected option, you will get a new field where you can enter the password needed to access the specific category.
Private will keep the categories and products hidden. You won’t be able to show those categories anywhere on your site, so be careful when selecting the option.
Optionally, you can hide password protected categories from your navigation menus and widgets.
You can customize the customer login page and most of the default options from the settings page. You can find the settings at WooCommerce Settings -> Products -> Password Protected Categories.
Here you can set all the basic settings to protect your products. These are default settings which can be overridden at different levels.
Here you can set the category visibility which only applies to Password Protected categories. You can set them to be visible in your menus and Storefront. That way, the users will be able to see and navigate towards those pages but would need a password to access them.
Another good setting is the duration of password cookies. You will set a duration for which user does not have to enter the password again.
This means if you set this value to 20, once a user accesses a protected product and enter the password, he will not be asked for the password again for the next 20 days.
This is a good way to make sure your users are not getting frustrated by excessive password management. You can set it to any value between 0 to 9999. So set this according to how frequently you want your password to expire.
One of the good ways to let your users know about the access is by prefixing your categories. Password protected categories will be marked “Protected: ” and private ones marked “Private: “.For example, a private category called “My Secret Category” would become “Private: My Secret Category”.
This way as soon as your users see the name of the category, they will know that it needs a password. In our opinion, this is a must since you don’t want to leave customers surprised by a category inaccessible to them.
The plugin also comes with good settings for creating a good-looking login page. You can customize and design the login page just like any other WordPress page; just include category_login shortcode where you want to display the login form.
Once your login page is created, you can let the plugin know about it from the settings. There are other options which allow you to set your login form correctly.
You can set the form title, Message, Password Field label, Placeholder text and Submit Button Text. You can also override these settings from the shortcode by adding proper variables.
Though you can hide your categories and products behind a password with this plugin, it does not hide them from Search Engines. Google and other search engines will still be able to crawl those pages and list them in search results. So If you want to hide those categories from search engines along with your users, you need to take help from your theme or SEO plugins.
If your theme supports the SEO setting, you can mark your pages as “nofollow”. Otherwise, if you use SEO plugins like All in One SEO or Yoast, use them to mark those product pages as “nofollow”. Once done, your pages will not be included in Search Engine results.
Multiple Categories Protection
You can create sub-categories within categories and decide to only protect a few of them with the help of passwords. But if you want to protect all of them with a single password, you can even password protect the parent category.
Once you protect a parent category, it will be applied on to all subcategories and products that are part of it. This is a good way to protect multiple categories and products with a single password.
The only problem with this kind of setup is that you need to make sure your products are listed in single categories. If you add them to multiple ones, the system will confuse which password to use. You need to duplicate products if you want them to be displayed in multiple categories. So make sure your product is listed correctly to be displayed and accessed correctly.
If you are looking to password protect some of your WooCommerce products or want only specific users to access them, use the WooCommerce Password Protected Categories plugin. It will let you control the visibility and accessibility of your categories & products. Don’t forget to check the demo to see what it looks like.
If you would like to create the entire store private, the same developer has an amazing solution in form of the WooCommerce Private Store Plugin.
Sanjeev Mohindra is a passionate blogger and technology enthusiast with more than 15 years of experience in enterprise software development. Over 8 years of experience of successfully building blogs from scratch.