Not too long ago, I talked about the somewhat paradoxical idea of password protecting WooCommerce product categories to prevent unauthorized visitors from accessing specific categories at your store.
Now, I’m going to take things one step further and show you how to create an entirely private WooCommerce store. That is, instead of merely restricting access to certain categories, you’re going to learn how to restrict access to the whole shebang in one fell swoop.
Why Would You Want To Create A Private WooCommerce Store? Isn’t That Counterproductive?
Well, if you’re trying to be the next Amazon, then yeah, it’s pretty counterproductive to hide your store from the general public.
But there are plenty of legitimate reasons that you might want to create a private WooCommerce store.
Here are a couple times this functionality can come in handy:
- Wholesale stores – many wholesale stores don’t want their stock (or prices) available to the general public.
- Members-only stores – if your WooCommerce store is only for registered members, you might not want the public to be able to see your products.
I’m sure you can probably think up some unique situations by yourself, as well.
How WooCommerce Private Store Helps You Hide Your Store
Like many of Barn2 Media’s other WooCommerce plugins, rather than trying to offer a bunch of different functions, WooCommerce Private Store focuses on doing one thing really well.
In this case, that “thing” is making your entire WooCommerce store private. That means everything will be hidden from both unauthorized users and search engines’ prying eyes.
So how do users gain access to your store, then? Well, you can use two different methods:
- WooCommerce Login Form – with this method, users will need to enter a password. Once they enter the password once, the entire shop will be unlocked for a period of time that you can specify (no need to re-enter the password multiple times).
- Unlock For Logged In Users – with this method, the store will be automatically unlocked for any users who are logged in to your WordPress site. Non-logged in users will only be able to see the non-WooCommerce parts of your website. This is great for hooking your store up with a membership plugin, or something similar.
What’s neat is that, in addition to protecting your core shop pages (product listings, checkout, etc.), WooCommerce Private Store also protects:
- Navigation menu links
- Sidebar widgets
And it will also remove your store from:
- Search results
- XML sitemaps
All in all, it’s pretty thorough about making sure unauthorized people or search crawlers don’t have access to any part of your store.
How To Use WooCommerce Private Store – A Hands-on Look
Ok, so now you know the features. But how do all of these features actually come together to help you create a private WooCommerce store?
Using the plugin is pretty simple. In fact, the setup process will probably only take you a few minutes.
Once you install and activate the plugin, there’s only one settings page that you need to complete by going to WooCommerce → Settings → Private Store.
In the top section, you can:
- Enter the password(s) to unlock your store. If desired, you can add multiple passwords by clicking the + icon.
- Choose how many days the store should remain unlocked after a user enters the password.
- Enter an (optional) page to redirect users to after they enter the password.
- Choose whether or not to automatically unlock the store for logged in users.
Below those settings, you can also configure the login form using the various options:
To add a login form, all you need to do is use the [ store_login ] shortcode (without the spaces).
By default, the plugin will pull information from the settings that you just entered. But if you’re planning to display a login form in multiple places, you can modify the shortcode on an individual basis with one of the three included parameters:
- message – lets you customize the message that displays above the login form.
- unlocked_message – lets you customize the message that displays after a user enters the password.
- visit_store – lets you customize the CTA displayed after a user enters the password (assuming you’re not already redirecting users to a custom page)
Here’s what the raw shortcode looks like as part of a page or a widget using the default styling from the free Storefront theme:
Because you create the form with a shortcode, you should also be able to include it as part of a page builder layout with most popular page builders.
And you can also use your own CSS styling to customize how the form looks.
Wrapping Things Up
Because of its niche functionality, WooCommerce Private Store is not a must-have plugin for every single WooCommerce store.
But if you need to create a completely private WooCommerce store, WooCommerce Private Store can help you get up and running with all the functionality that you need in just a few minutes.
Just remember – WooCommerce Private Store is only for restricting access to your entire store. If you’d prefer to only restrict access to specific categories, you’ll be better off with the WooCommerce Password Protected Categories plugin.
I hope you enjoyed the guide and it makes your WooCommerce life easier!