We've added a new WooCommerce customer login feature to our popular plugin 'WooCommerce Password Protected Categories'. It lets you create a hidden or private product category for each customer.
This means that you can now choose between 2 plugins to create a WooCommerce login:
- WooCommerce Password Protected Categories - Perfect for protecting specific areas of your WooCommerce, which will run alongside your public shop. With this plugin, different customers can access different product categories. Or you can give multiple customers access to a single password protected category - the choice is yours.
- WooCommerce Private Store - Make WooCommerce private by hiding your entire online store from public view. With this plugin, all your customers will have access to the same products within your private WooCommerce shop.
This post is about how to use WooCommerce Password Protected Categories to create individual customer logins, with different products categories for each customer.
What sort of websites need a WooCommerce customer login plugin?
A WooCommerce customer login plugin is suitable for any online store that has different products for different customers. Here are 2 case studies to illustrate how customer-specific products might be used.
Client login for a photographer's website
Professional photographers can use WooCommerce Password Protected Categories to sell the images from their photoshoots. It works like this:
- The photographer undertakes a photoshoot for a specific client. This might be wedding photography, a family photoshoot or corporate photography.
- After the photoshoot, the photographer creates a password protected WooCommerce category for that client. They add each photo as a product in this category (depending on their pricing structure etc.).
- The photographer notifies the client that their photos are available on the website and gives them the password for their WooCommerce category.
- The client visits the website and clicks a 'Client Login' link. This shows them the WooCommerce customer login form added by the plugin.
- The client enters the password into the login form and are automatically redirected to the category containing their photos. They can browse the photos and order online. If they give the password to others, such as their wedding guests, then they can order photos from the protected category too. The photos will remain private and hidden from public view. Only people with the password will ever know the hidden products exist.
Check out our tutorial of how to hide products in WooCommerce.
Company branded workwear for an industrial clothing seller
Another popular use case is company-branded workwear. An industrial clothing manufacturer may have a public WooCommerce store selling specialist clothing such as fire retardant workwear. Most of their customers probably use the public categories, but they may have deals with certain companies to provide branded versions of their products. For example, a company might order personalised versions of their workwear with its logo and brand colours, for an agreed price.
You can use WooCommerce Password Protected Categories to add the personalised clothing as products in a password protected category which is only available to the relevant company. They can click a 'Trade Login' link on the website, enter their password and be directed to the WooCommerce category with their branded workwear. The company can then order the customised items - and products from the public site at the same time, if they wish - without anyone else knowing they exist.
How does the customer login form work?
The WooCommerce Password Protected Categories plugin now includes an option to create a central customer login page.
How do you create a customer login page?
There are 2 ways to create your WooCommerce customer login page. This is also covered in the Password Protected Categories knowledge base.
Method 1 - Select your client login page
- Go to the plugin settings page at WooCommerce > Settings > Products > Password Protected Categories. (find this at: /wp-admin/admin.php?page=wc-settings&tab=products§ion=protected-cats)
- Click on the dropdown list next to 'Category Login Page'. Select the page where you want your WooCommerce customer login form to appear.
- Scroll down and click 'Save changes'.
This will automatically add a shortcode to the page you have selected and the customer login form will appear.
Method 2 - Add the category login shortcode
For an even more flexible option, simply add the following shortcode to any page, post or text widget:
This will add a login form where customers can enter the password for their protected WooCommerce category.
A lot of sites will want to use the shortcode to create a WooCommerce sidebar login widget. This lets people log into their private category wherever they are on your website:
You can even customise the login form wording...
You can add other content above or below the shortcode as needed. Just go to the page, post or widget where you added the login form and add your other content.
You can also customise the message that appears within the customer login form as follows:
[category_login message="Add your custom message here."]
...And add private sub-categories for each customer
The above instructions tell you how to create a single WooCommerce product category for each customer. The plugin also lets you divide the private shop for each customer into sub-categories. For example:
- A photographer might create a main category for each customer, with a sub-category for each of their photoshoots.
- An industrial clothing seller might have a main category for each company they provide branded workwear for. This might be sub-divided into categories for office wear, heavy duty wear etc.
To create customer-specific sub-categories:
- Create a main top level category for each customer. Do this in Products > Product Categories in the WordPress admin. Select 'Password protected' and choose a password.
- Next, add all the sub-categories for that customer. Select the main category for that customer as the 'Parent'. Leave the sub-categories set to Public.
- Add the customer's unique products to the relevant category and sub-categories.
- You also need to set up your WooCommerce category pages to display sub-categories so that customers can navigate to their other categories. Do this in WooCommerce > Settings > Products > Display (find it here: /wp-admin/admin.php?page=wc-settings&tab=products§ion=display). Under 'Default Category Display', choose 'Show subcategories & products' if you want the customer's main page to show both products and sub-categories. Or choose 'Show subcategories' if you just want their sub-categories to appear so that they have to click on one to view the products within.
- Click 'Save changes'.
How did people create customer-specific products before?
Most WooCommerce stores have various products which are available to the public. We developed the WooCommerce Password Protected Categories plugin nearly a year ago to let people protect or hide some or all of their product categories.
The plugin has proved very popular. It's used for various types of website ranging from WooCommerce wholesale stores to shops with customer-specific products.
Until now, the only way to create customer-specific products was to give each client a secret link to their password protected category. This worked fine, but a lot of plugin users have asked us for a central WooCommerce customer login page. This is now available and I hope this article helps you to create your own login page for customers to access hidden categories.
Where can I test the WooCommerce customer login plugin?
We've added a WooCommerce Login page to the Password Protected Categories plugin demo. If you enter the password 'letmein' then you'll be directed to the Clothes category. The password 'teatime' will direct you to the Food category.