Create WooCommerce private products the easy way

WooCommerce private products featured image

Certain types of stores may need to use WooCommerce private products. WooCommerce does give us a very basic way to hide products. And WordPress itself provides the ability to password-protect a page or even a product. However, neither of these methods is very satisfactory.

How to create WooCommerce private products

In this article, we’ll look at how to create private products in WooCommerce using a single plugin.

The WooCommerce Members Only plugin lets you set up your private products in a matter of minutes. You can decide who can access your content, and define which content is private and which is public. You can also set how to restrict access, e.g. by password or user role.

WooCommerce Members Only featured image

WooCommerce Members Only

Create private products in WooCommerce

Find Out More

In total, throughout this article, we’ll look at:

  • Some reasons why you’d want to create private products and some different ways to make products private
  • The different methods to protect your products, including password protection and user roles
  • How to make all the products within an entire category private

And, best of all, it’ll only take a few minutes.

What is a private product on WooCommerce?

Private products are products that have some or all of the following characteristics:

  • Hidden from some customers or users
  • Visible to all customers but only purchasable by some
  • Password protected
  • Restricted by user role
  • Client specific products

WooCommerce hidden products

By default, WooCommerce doesn’t allow you to create private products. There is an option to make a product ‘hidden’, which only means that it won’t appear on the shop page or in product archives. It’s still accessible directly though if you have the URL.

This has limited application, particularly when we consider some of the ways to use private products below.

WordPress private posts and products

WordPress also allows you to make posts, including products, ‘private’. A private product, in this sense means that only admins and editors can view it.

Again, this doesn’t help you if you want certain customers to be able to view your private products.

WordPress password-protected posts and products

WordPress itself allows you to password-protect posts, including products. Again though, this has limited application. Perhaps it’s useful if you want to share a link with a colleague before you publish it to the world.

Private products are the answer

Private products, on the other hand, take the concept much further. They can be totally hidden from users, redirecting users to a landing page if they try to access the product with a direct URL.

They can also, if you want, be visible to all users but only accessible to some.

What are the benefits of WooCommerce private products?

If you’ve landed on this page because you’re interested in how to create private products in WooCommerce, you might want to skip ahead to the next section.

But if you’re wondering how private products could benefit you, then this section is for you.

Here are a few good reasons why you might want private products in your store:

Client-specific products

Client or user-specific products are only available to certain customers. Good examples of this type of store include photographers or print shops who are creating products on a customer-by-customer basis and may only want those products to be visible to their owners.

There’s a whole article on client-specific products and how to create them here.

Members-only products

Maybe you’re running a membership site or you just have certain products that you’d like to offer exclusively to certain customers. Private products are perfect in this instance – you can hide them from the general public and make them accessible to customers you’ve selected.

There’s an article about how to create a members-only store in WooCommerce here.

Staff-only products

If you are running a company that provides staff-only equipment or material, then private products are the solution for you. You can use the main part of your shop to sell your customers products, then keep a section private for staff goods.

Age-restricted products

If you’re selling alcohol or other age-restricted products, you won’t want to have those products in full view of any younger visitors browsing your store. The best way to keep them hidden is to make them private.

Branded products

Many businesses provide branding services – for example, you might be running a B2B store where you supply other businesses with workwear. Having private products means you can separate products from the rest of the store so that they’re only visible to the customers you want.

How do I create a hidden product in WooCommerce?

The easiest way to create a hidden product is to use a plugin like WooCommerce Members Only. This plugin has all the features you need to make products private, enabling you to set global rules on content, and categories, or drill down to specific products.

WooCommerce Members Only featured image

WooCommerce Members Only

Create private products in WooCommerce

Find Out More

Let’s take a very simple example and imagine we’re creating a single product that we only want a few of our customers to see. Here’s a step-by-step guide to the process.

Further down, we’ll also look at keeping multiple products private.

Step One: Install WooCommerce Members Only

First of all, we need to install and activate the Members Only plugin. We will use it to set unique privacy rules for different products.

Step Two: Set global product visibility

When Members Only is installed and activated, all your products and content will still be visible, not private, by default.

To check this:

  • Go to Members Only > Settings and ensure the ‘Restriction Method’ option is set to ‘No restriction’. This means that Members Only won’t apply any global restrictions to your content
  • You can also set some other options here – we’ll look at these further on
Members Only no global restriction

Step Three: Make your selected product private

Now, go to the edit screen for the product that you want to protect from general customers.

In the ‘Product data’ panel, you’ll see a new tab called ‘Members Only’. Click on this.

Private product - no restriction

The ‘Restriction method’ field has the following options:

  • No Restriction: the product is not private and any user can view it
  • By User: the product is private – except from specified individual users
  • By User Role: the product is private – you can choose which user roles are blocked from seeing the product and/or which specific roles can view it
  • Password: the product is private unless the user has a password

Password-protected product

To password protect this product, set the ‘Restriction method’ to ‘Password’. This will bring up the ‘Passwords’ field.

WooCommerce private product passwords

You can enter as many passwords in the ‘Passwords’ field as you like; just enter each one on a new line. All the passwords you enter in this field will be valid for this product.

The advantage of having multiple passwords is that you can give different customers different passwords if you wish. Also, if you’ve got several private products, you could make some passwords valid across all products while other passwords only work for certain products.

Private products for individual users

If you prefer, you can make the product private for one or more users. Just set ‘Restriction method’ to ‘By User’ then choose one or more users in the ‘User IDs’ field.

Private product by user

Only the users specified will be able to access the product.

Private products by user role

Alternatively, you can select ‘By User Role’ as the restriction method. You can either enter which roles can view the product, or you can select roles which are blocked from viewing the product.

Private product by user role

Hide in Archives

The ‘Hide in Archives’ setting allows you to fine-tune your private product’s visibility. Whether you check this option or not depends on how visible you want your product to be.

If you select this checkbox, then the product won’t appear in any archive pages, including the shop page, category pages and search results.

If you leave it unselected, then the product will still be visible on those pages, but no one will be able to view the product page itself without the correct password, user role or user ID (depending on the restriction method). This is a great option if you want customers to see that there are certain products in your store, perhaps as an incentive or encouragement to join.

Step Four: Publish your product

This is literally all you need to do to make your product private and protected by one or more passwords. You can go ahead and publish it now.

What happens if the user is blocked from the product?

If a user tries to access a private product, they’ll be redirected to a landing page where they’ll be asked to enter their password. Let’s take a look at that in a bit more detail.

Defining your password page

If you set the ‘Restriction Method’ to ‘Password’, Members Only will prompt you to ask if you want it to create a page to hold the password form.

Password form page prompt

If you click the ‘Yes’ button, the plugin will automatically create a new page and add a shortcode which will display a password form.

Now, when a user tries to access a product that’s password protected, they’ll be redirected to the page with the form where they can enter their password.

How to create WooCommerce private categories

We’ve seen how easy it is to make a single product private. Now let’s look at making multiple products private.

The simplest way to do this is through the use of private categories. Making a category private means that all the products within it are automatically private too.

To create a private category in WooCommerce:

  • Go to Members Only > Settings
  • Choose the ‘Restriction Method’ to keep content private:
    • Log in status: use this method if you only want to display protected categories to users who are logged in. This is the simplest way to protect certain categories: only users who are logged in will be able to access the restricted categories and products. If the user is not logged in, they’ll be redirected to a page of your choosing.
    • Password: use this method if you want to add a password form to protected content. Password protecting your categories allows you to create one or more passwords that you can distribute to users as you wish. Any user who tries to access a restricted product will be presented with a password form.
    • User role: use this method if you want to protect categories from some user roles, but allow others to access it. You can also specify individual users that are permitted to view the content using this method
WooCommerce protected categories settings

Once you’ve chosen the restriction method, you can create a membership plan to define which categories you want to keep private:

  • Go to Members Only > Plans and click the ‘Add New Plan’ button
  • Select ‘Specific Content’ in the ‘Restricted Content’ field
  • Then choose ‘Product Categories’ as the ‘Content Type’
  • Select which category you’d like to keep private in the ‘Restricted Product Categories’ field
WooCommerce private category settings

Depending on which restriction method you’re using, you can enter the ‘Permitted User Roles’ that are allowed to view the content. Or you can enter the ‘Passwords’ that users will need to access the category.

Passwords for private category

If you would like to keep different categories private from different users, you can create multiple plans and update the settings accordingly for each one.

Redirecting the user

When you create a membership plan, you can also define which page the user should be redirected to if they try to access products in a private category. Just select a page from the ‘Landing Page’ setting.

Note that if you have multiple plans, you can set different landing pages – so the user will be redirected to a different page depending on what private content they tried to access.

WooCommerce membership landing page setting

Frequently Asked Questions

How do I make my WooCommerce store private?

A private store enables you to sell exclusive products or run a membership or subscription-based store. You can easily create a password-protected WooCommerce store by creating password-protected products or private product categories. Since this is not a functionality available in default WooCommerce, you can use a plugin like WooCommerce Members Only.  

How do I hide a product from a user in WooCommerce?

Hidden products allow for more targeted and personalized shopping experiences, as well as the ability to protect sensitive or restricted products. You can hide a product from users by restricting content by user role or by protecting it using a password. With a plugin like WooCommerce Members Only, you can set it up in minutes!

Let’s recap

So, we’ve looked at what WooCommerce private products are and why you might benefit from using them in your store. We also looked at a couple of methods of creating them – firstly, creating a single private product and secondly, creating multiple private products through a protected category.

You can accomplish all this (and more) with a single plugin – WooCommerce Members Only.

WooCommerce Members Only featured image

WooCommerce Members Only

Protect your content and sell members-only products

Find Out More

Leave a Reply

Your email address will not be published. All fields are required.