This ultimate 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 a 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. You will learn how to:
- Add user login to your WooCommerce store.
- Make users log in before purchasing.
- Hide your entire store from logged-out users.
- Restrict specific products and categories to logged-in users.
- Send your customers WooCommerce auto-login links.
Read on, or watch this video to see how each login method works.
Importance of a customer login for WooCommerce
- Personalized user experience: WooCommerce customer login allows you to provide a personalized experience to your customers. They can easily access their order history, saved payment methods, and shipping details, which can save them time and effort.
- Increased security: With a WooCommerce customer login, you can secure customer data by allowing access only to registered users. It also allows you to monitor and track user activity to prevent any fraudulent or suspicious activity.
- Targeted marketing: A WooCommerce customer login feature allows you to track customer behavior and preferences, which can be used to create targeted marketing campaigns. You can also offer personalized discounts and promotions to customers based on their purchase history.
- Improved customer engagement: WooCommerce customer login feature can help you create a loyal customer base. You can send personalized emails, update them on new products or services, and gather feedback on their experience.
- Simplified checkout process: When WooCommerce customers log in, they can save their payment and shipping details, making the WooCommerce checkout process faster and more convenient. This can increase customer satisfaction and encourage repeat business.
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 log in, or they can optionally create a WooCommerce account during checkout.
- Public WooCommerce store with mandatory user accounts - Lots of WooCommerce stores can be browsed by anyone, but customers must register or log in to their WooCommerce 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 log in or enter a password to access it.
- WooCommerce auto-login links - Let customers log in more easily by clicking on a personal login URL. No more usernames or passwords!
With nearly 2 million using WooCommerce sites 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 customer 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 answer customers' questions about the products.
Option 2 - Public WooCommerce store with mandatory user accounts
How to add a Register/Login page to WooCommerce
The WooCommerce login shortcode
[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 login shortcode
[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 log in, try Peter's Login Redirect. It's easy to set up and we've used it on lots of our client's websites.
How to force WooCommerce customers to log in 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 WooCommerce customer login usernames and passwords.
There's also a box to display a login reminder on the checkout so that existing customers can log in. This is really useful if guest checkout is disabled, as you need to make it easy for customers to log in.
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 log in the 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 WooCommerce account for your website and remembering their logins. (And of course, WordPress insists on secure passwords these days so they can't just log in 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 log in to a public WooCommerce store. They might have to log in to purchase, but anyone can browse the store and see the products. You can also create a WooCommerce login system where customers have to log in 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 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 log in 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 log in 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 customizing the text on the password WooCommerce login page, and hide protected categories from the public areas of your store.
- Now, go to the product category that you want to hide behind the WooCommerce 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 log in to a category.
Option 4 - Create a login-only store
WooCommerce Private Store forces customers to log in 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 WooCommerce 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 a 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.com/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 e-commerce store will be protected. Customers will have to log in 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 realize 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 log in.
WordPress and WooCommerce auto login plugins provide a dynamic link that automatically logs customers into their accounts. This saves customers from 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 step-by-step tutorial on how to set up WooCommerce auto-login URLs.
What type of WooCommerce login do you use?
As you can see, there are many types of WooCommerce login designed for different types of stores. I hope this guide has helped you to choose the right login method for your WordPress site and to set it up properly.
How do you allow customers to log in to your site? Are there good WooCommerce plugins I've missed? What pitfalls did you come across and what would you advise other WooCommerce users? Please add your comments below.