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 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.
- Customer portal with protected product categories – Instead of (or as well as) individual customer accounts, you can password protect parts of a WooCommerce store or restrict them to specific users or user roles. Anyone can buy from the public areas of your shop, while only customers with the right credentials can access your protected categories. Once a customer logs into your protected categories, they can view and buy the hidden products inside.
- 100% private WooCommerce store – Some websites want to hide a whole WooCommerce store from public view so that customers must login or enter a password to access it.
- WooCommerce auto-login links – Let customers login more easily by clicking on a personal login URL. No more usernames or passwords!
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.
Check out this free Helpie WooCommerce FAQ plugin which helps to create an FAQ section on your WooCommerce product page to easily answers customers question about the products.
Option 2 – Public WooCommerce store with mandatory user accounts
How to add a Register/Login page to WooCommerce
[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.
WooCommerce social login
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 instructions in the knowledge base 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 3 – Login portal with WooCommerce protected categories
Options 1 and 2 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 or enter a password in order to see your products or other store content.
The WooCommerce Protected Categories plugin creates a login portal where different customers can see different products. It locks down one or more of your product categories so that no one else can see them. Customers must log into WooCommerce with the correct credentials to see the products inside their portal.
You can create separate categories for different groups of customers, and you can even create customer-specific products. Each customer logs in and views the restricted products that they have access to.
Who needs protected product categories?
You can use WooCommerce Protected Categories 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 or login to view the single product product page or purchase. This lets you display all products in the public store, while only pre-approved customers can buy protected ones.
- Hide protected categories and products from the public store. Alternatively, you can hide protected WooCommerce categories and their products from public areas of your store. Authorized users can login and 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.
- Hide your entire WooCommerce store. Finally, you can put ALL your products within one or more protected categories. This way, customers have to login 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 protected categories in WooCommerce
You can read full setup instructions in the plugin knowledge base. Here’s a quick guide to get you started:
- First get WooCommerce 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 password login page, and whether to hide protected categories from the public areas of your store.
- 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 ‘Protected’ and either password protect the category, or restrict it to specific users or roles.
- Repeat step 5 for all the categories you want to protect.
Finally, test your WooCommerce 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 login to a category.
Option 4 – Create a login-only 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 logging into their user account or 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 password protection or user login form
The plugin knowledge base 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 customizing the WooCommerce login form text. Either choose a password to password protect WooCommerce, or tick the ‘Logged In Users’ option to automatically unlock it for logged in users or specific roles.
Once you’ve saved the settings page, your whole store will be protected. Customers will have to login or enter the password 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.
WooCommerce 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 article and quiz on which WooCommerce protection plugin to use.
Option 5 – WooCommerce auto-login by URL
Finally, you might want an easier way for your WooCommerce store’s customers to login.
WordPress and WooCommerce auto-login plugins provide a dynamic link that automatically logs customers into their accounts. This saves customers having to remember or store usernames and passwords. All they need is their personal auto-login URL.
You can use this option with options 1, 2, 4 and 5 listed above.
For full instructions, check out our separate guide on how to set up WooCommerce auto-login URL’s.
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.