1. Home
  2. Knowledge Base
  3. WooCommerce Protected Categories
  4. FAQ

Can I hide my public store from users logged into a protected WooCommerce category?

If you're using our WooCommerce Protected Categories plugin to create a hidden area within your WooCommerce store (e.g. a wholesale area), then it will run side-by-side with your public store. Normal customers will only see the public categories and their products. People who have unlocked a protected category will see the links to the protected category and its products, as well as the usual links to the public store.

The plugin doesn't have an option to hide the public parts of the site from people who have unlocked a protected category. Here are some suggestions on how you can achieve this.

Option 1 - Protect each part of your store

If you don't want any public areas within your store, then you can protect all your categories. You can protect each category separately, so that different people can see different products.

This is a good option if you have a private store selling different products to specific customers. However, it's not an option if you need a public area within your store which everyone can access.

Tip: If you want to protect your entire store behind a single password or user login, check out our WooCommerce Private Store plugin instead.

Option 2 - Use your website structure & navigation

Another option is to discourage people who have unlocked your protected categories from accessing the public areas of the store. There are lots of ways that you can do this by planning your navigation structure in a clever way. Here are some suggestions, using the example of a WooCommerce wholesale store with a separate retail and wholesale area:

  • Add a link to the wholesale category (or sub-categories, if you have them) to your main navigation menu. Label it clearly as something like 'Wholesale Area' to discourage wholesale users from clicking to the public store. If you untick the 'Show protected categories & their products in navigation menus' box on the plugin settings page, then this link will only appear to people who have unlocked the protected wholesale category. (Or if you want to use this link as your wholesale login page too, then you should tick this box so that people can click on the link to login.)
  • If your store has a left or right sidebar, then you could add different widgets to the public and wholesale areas. Use a plugin such as Widget Options to add widgets listing the public categories to the public store, and wholesale content for the wholesale store. Set the widgets to appear on the correct categories and product pages only.
  • If you're still concerned, then you could write some custom code to automatically hide the menu links to the public parts of your store from anyone who is in the wholesale area. This would be outside of our plugin support - if you don't have a developer who can do this, then we recommend posting a job on Codeable. We have partnered with them to provide plugin customizations for our customers.

Option 3 - Use the Menu by User Role plugin

If you're using the role protection options in WooCommerce Protected Categories, then you can use it with the Menu by User Role plugin to create a separate navigation menu for each user role. For example, you can create a menu that is visible to guest users only, and a separate menu that is visible to logged in users with a specific role.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.