WooCommerce Login for your Customers: The Ultimate Guide
This guide contains everything you need to know about WooCommerce login for your customers. We’ll look at the different ways you can let customers log into a WooCommerce online store, and why. I’ll tell you how to set up WooCommerce login straight out of the box, with or without compulsory registration and social login. I’ll also share some handy login plugins to create a hidden or private WooCommerce store that only logged in customers can access.
What are the different types of WooCommerce login?
By ‘WooCommerce login’, I’m talking about the process where customers log into your online store. It’s quite a vague term and there are several ways do to set it up. Which one you choose depends on how you want your store to work.
- Public WooCommerce store with guest checkout – This is the most common WooCommerce setup. Anyone can browse your products and there is no hidden WooCommerce content. Customers can buy products as a guest without having to login, or they can optionally create an account during checkout.
- Public WooCommerce store with mandatory user accounts – Lots of WooCommerce stores can be browsed by anyone, but customers must register or login to their account in order to purchase.
- Public store with WooCommerce social login – To increase convenience for customers, you can let them log into your website using their social media profiles such as Google, Facebook or Twitter.
- Password protected categories – Instead of (or as well as) individual customer accounts, you can password protect parts of a WooCommerce store. Anyone can buy from the public areas of your shop, while only customers with the right password can access your protected categories. Once a customer logs into your password protected categories, they can view and buy the hidden products inside.
- Password protected private store – Some websites want to hide a whole WooCommerce store from public view so that customers must login by entering a password to access it.
With nearly 2 million websites using WooCommerce according to the latest WooCommerce stats, there are plenty of people looking for all these login options.
Which type of customer login is best for my WooCommerce store?
I’ve created a quick quiz to help you with this. Answer the simple questions about your requirements, and the quiz will recommend the best WooCommerce login plugin for your website.
Option 1 – Public WooCommerce store with guest checkout
Most WooCommerce stores let anyone view and buy their products, whether or not they’re logged in.
How to enable guest checkout in WooCommerce
- Log into the WordPress dashboard and navigate to WooCommerce > Settings > Checkout.
- You’ll see a box with the label ‘Enable guest checkout’.
- Tick this box and customers will be able to purchase without logging in or creating a user account.
How to prevent user account creation in WooCommerce
If you like, you can prevent customers from creating user accounts at all. To do this, go to WooCommerce > Settings > Accounts. Untick the boxes to enable registration on the Checkout and My Account pages. This will prevent customers from registering for your site at all, so you don’t need to provide a login page.
Option 2 – Public WooCommerce store with mandatory user accounts
How to add a Register/Login page to WooCommerce
When you first install WooCommerce and run the Setup Wizard, there’s an option to automatically create all the essential pages for your store. Do this, and you’ll see a ‘My Account’ page in your list of pages (along with other new pages for shop, cart and checkout).
[woocommerce_my_account] will appear on the page. You can use this page as your register/login page, for example by linking to it from your header or sidebar.
The WooCommerce login/register form works as follows:
- Guest users will see the WooCommerce login form, possibly with a registration form. To include the registration form on the login page, go to WooCommerce > Settings > Accounts and tick ‘Enable registration on the “My Account” page’.
- Logged in users will see their Account page, with their order history, profile and other information.
You can add the
[woocommerce_my_account] anywhere else on your website to create extra login forms. There are other plugins available to do this such as Sidebar Login and Woocommerce Login / Signup Lite. These let you create more complex WooCommerce login forms. However you only need an extra plugin if the built-in WooCommerce login shortcode isn’t suitable for you.
Tip: If you want to control where users are redirected after they login, try Peter’s Login Redirect. It’s easy to set up and we’ve used it on lots of our clients’ websites.
How to force WooCommerce customers to login or register before they buy
- In the WordPress dashboard, go to WooCommerce > Settings > Checkout.
- Untick the ‘Enable guest checkout’ box. This will force users to create an account when they buy from your WooCommerce store.
You can further configure how user accounts are created in WooCommerce > Settings > Accounts. This WooCommerce page has several settings such as whether to include a registration form on the checkout page and whether to automatically generate customer login usernames and passwords.
There’s also a box to display a login reminder on the checkout so that existing customers can login. This is really useful if guest checkout is disabled, as you need to make it easy for customers to login.
Note: If a customer completes checkout without logging in then an account will be created for them behind the scenes. They will receive the login details by email so that they can login next time they purchase from you.
Option 3 – Public store with WooCommerce social login
With social login, you create a public WooCommerce store as usual so that anyone can browse your products. As part of the checkout, they can log into your website using their social media accounts.
You might offer social login in addition to – or instead of – the option to register directly on your WooCommerce website.
Research suggests that over 77% of customers prefer to log into WooCommerce or other websites using social media. This is hardly surprising given that it saves them the hassle of creating a new account for your website and remembering their logins. (And of course, WordPress insists on secure passwords these days so they can’t just login with an easy-to-remember password!)
Back in 2014, I wrote about a ‘deadly embrace’ caused by WordPress social login plugins. At the time, the available plugins conflicted with built-in WordPress user accounts. Things have improved since then but if you’re considering social login then I recommend you use the official WooCommerce extension. This offers the best chance of creating a user-friendly WooCommerce social login for your website.
How to add social login to a WooCommerce store
To add social login to your WooCommerce website, I recommend the official WooCommerce Social Login plugin. Once you’ve purchased the plugin, follow the steps in the documentation to enter your license key and set it up.
Given the issues I previously identified with social login, I recommend thorough testing before it goes live. Make sure your WooCommerce login process works seamlessly. In particular, test the following aspects of the login process:
- First time WooCommerce logins using each social network.
- Repeat logins using the same social network.
- Repeat logins using a different social network. (i.e. what happens if a customer forgets which social network they logged in with previously?)
- Register using social login and then try logging in directly on the website using the Lost Password link.
Basically, try to break it and send a support request to WooCommerce if you discover any problems. Social login is a great idea but needs thorough testing to get right, as customers may forget how they previously logged into your WooCommerce store.
Option 4 – WooCommerce password protected categories
Options 1-3 are about letting customers login to a public WooCommerce store. They might have to login to purchase, but anyone can browse the store and see the products. You can also create a WooCommerce login system where customers have to login by entering a password in order to see your products or other store content.
The WooCommerce Password Protected Categories plugin locks down one or more of your product categories. Customers must login with the correct password to see the products inside.
Who needs password protected categories?
WooCommerce Password Protected Categories can be used in several ways:
- Show products from protected categories in the public areas of your store. When someone clicks a protected product, they must enter the password to login and view the product. This lets you display all products in the public store, while only pre-approved customers can buy password protected ones.
- Hide password protected categories and products from the public store. Alternatively, you can hide protected WooCommerce categories and their products from public areas of your store. The plugin provides a central WooCommerce login page where customers can enter a password to be directed to the correct hidden category. This is perfect WooCommerce wholesale stores or customer-specific products where you sell different products to each customer.
- Automatically show protected categories and products to logged in users. ‘Private categories’ are another option. Unlike password protected categories – which are completely separate from WordPress user logins – private categories automatically appear for logged in users depending on their level. This is normally Administrators and Store Managers but you can create extra user levels for certain customers, or make private products available to all customers, by modifying the user level permissions. (I recommend User Role Editor if you don’t know how to do this.) Once a custom logs into WooCommerce using the built-in WooCommerce login form (see Option 2, above), private categories and their products will automatically become visible to them.
- Hide your entire WooCommerce store. Finally, you can put ALL your products within one or more password protected categories. This way, customers have to login with the correct password before they can view your products or buy. (Tip: While it’s possible to hide your whole store with this plugin, you might prefer Option 5, below. Both plugins let you create a WooCommerce hidden store)
How to create password protected categories in WooCommerce
You can read full setup instructions in the plugin documentation. Here’s a quick guide to get you started:
- First get WooCommerce Password Protected Categories.
- Install and activate the plugin.
- Go to WooCommerce > Settings > Products > Protected Categories and enter your license key.
- Change any settings such as customising the text on the central login page, and whether to hide password protected categories from the public areas of your store. (Note: The password protected category login page is separate from the WooCommerce login page that I discussed in Option 2. The former lets customers login to a specific category by entering a password. The latter lets them log into their WordPress user account, if they have one. If you need both, think about the user journey and how to make it as intuitive as possible.)
- Now, go to the product category that you want to hide behind the login page. You’ll find this in Products > Categories. The plugin has added a new ‘Visibility’ section with options to password protect the category or make it private. Choose ‘Password protected’ or ‘Private’ depending on how you plan to use the plugin.
- Repeat step 5 for all the categories you want to protect.
Finally, test your WooCommerce password protected categories from different customer login scenarios. For example, try it when you’re logged in and out of the website. Also try it before and after you enter the password to login to a category.
Option 5 – Password protected private store
WooCommerce Private Store forces customers to login to your WooCommerce store before they can see your shop page, products, categories or any other store content. It’s a simple but effective plugin to hide WooCommerce from public view, without affecting the public parts of your site.
By entering a simple password on the WooCommerce private store login page, customers can unlock the store and access the products and other content inside. Your public users won’t even know you have a WooCommerce store, unless you decide to link to the login page. (In which case, they will be able to see the WooCommerce login page but none of the content behind it.)
How to hide your whole WooCommerce store behind a password login form
The plugin documentation contains full setup instructions for WooCommerce Private Store. I’ve also provided details below. Setting it up literally just takes a few minutes:
- Buy the plugin from https://barn2.co.uk/woocommerce-private-store.
- Go to WooCommerce > Settings > Products > Private Store.
- Enter your license key and change any settings such as customising the WooCommerce login form text.
Once you’ve saved the settings page, your whole store will be protected. Customers will have to enter the password to login before they can see ANY WooCommerce content such as the main shop page, products, categories etc. Your WooCommerce content will also be blocked from search engines, so it’s a simple yet secure way to make WooCommerce private.
Note: The private store login page is different from the WooCommerce login page mentioned in Option 2. The private store login lets customers login to a specific category by entering a password. The WooCommerce login is for logging into a WordPress user account. If you need both types of WooCommerce login page, it’s worth planning the most user-friendly way to structure your store. I’d recommend adding an obvious ‘Store login’ link to the private store login page, so that customers can easily unlock the store. Don’t add any links to the user login page (aka ‘My Account’) as customers can login to their account during checkout. This will help to prevent confusion.
WooCommerce Password Protected Categories or Private Store?
I realise that the plugins mentioned in options 4 and 5 are quite similar. You can use them in similar ways but they can also be used very differently in terms of WooCommerce login options. Check out my post and quiz on which WooCommerce password protection plugin to use.
What type of WooCommerce login do you use?
As you can see, there are many types of WooCommerce login designed for different types of store. I hope this guide has helped you to choose the right login method for your website, and to set it up properly.
How do you allow customers to login to your WooCommerce site? Are there are good plugins I’ve missed? What pitfalls did you come across and what would you advise other WooCommerce users? Please add your comments below.