Hide WooCommerce products from guests

If you run a WooCommerce store, there are many situations where you don’t want anonymous visitors to browse your products.

The good news is that you can easily hide WooCommerce products from guests without writing custom code using this plugin: Hide Products by User Role for WooCommerce.

Easily Hide WooCommerce Products for Guests

The Hide Products by User Role for WooCommerce plugin gives store owners complete control over who can see products based on WordPress user roles, including guests.

You can configure global visibility rules or manage restrictions on individual products and even product variations.

Some of its most useful capabilities include:

  • Hide all products from guests with a single global rule
  • Hide products by category or tag 
  • Set visibility on individual products
  • Control visibility separately for WooCommerce variations
  • Fully role-based visibility control

Everything can be managed from the WooCommerce interface without touching PHP code.

Global rule for more products

If you want to hide more products in one click with a global rule, go to WooCommerce > Settings > Products > Hide by User Roles.

hide products by user roles global settings

Then create a new rule.

  1. Select Guest as user role.
  2. Choose a target rule type:
    • All Products: hide your entire catalog from guests.
    • Product Category: hide products belonging to specific categories (you can select more than one).
    • Product Tag: hide products belonging to specific tags (you can select more than one).
hide product woocommerce by categories

With just a few clicks, you can fully control what guests are allowed to see.

Hide a Single Product from Guests

For more precise control, you can hide individual products.

hide single woocommerce product from guests

To do this:

  1. Open the product in the WordPress admin
  2. In Product Data, open the “Hide by Role” tab
  3. Select Guest
  4. Save the product

That’s it, this product will now be invisible to guest users across your entire store.

Hide Specific Product Variations from guests

You can also hide individual variations of variable products.

hide woocommerce product variation from guests

To do this:

  1. Edit the product in the WordPress admin
  2. Go to the Variations tab
  3. Expand a variation
  4. At the bottom, find “Hide this variation for”
  5. Select Guest
  6. Save changes

This allows fine-grained control over which variations are visible to different user roles.

What Happens When Products Are Hidden from Guests?

When products are hidden from guests:

  • Shop pages won’t display restricted products
  • Category and tag archives stay protected
  • Search results won’t reveal hidden items
  • Direct product URLs redirect guests to the login page
  • Logged-in users with restricted roles are redirected back to the shop

This effectively transforms WooCommerce into a fully controlled private catalog while maintaining compatibility with your existing store.

Perfect for Wholesale and Membership Sites

This plugin it’s perfect for wholesale and membership sites that need to hide particular products.

For example:

  • Retail customers see consumer products
  • Wholesale customers see dealer-only inventory
  • Members access premium merchandise
  • Guests cannot browse any products until they register

Instead of maintaining multiple websites, role-based visibility lets one store serve everyone appropriately.

Why Hide WooCommerce Products from Guests?

By default, WooCommerce displays products to everyone, even visitors who aren’t logged in. 

And usually it’s how traditional online stores should work.

But there are some cases where you want to hide products from guests. These are the common use cases:

  • B2B wholesale stores that only sell to registered dealers
  • Membership websites with exclusive products
  • Private catalogs where pricing should remain hidden
  • Subscription businesses with premium merchandise
  • Multi-role stores that show different products to different customer groups

Restricting product visibility can also improve user experience by displaying only relevant products and reducing unnecessary catalog clutter.

The Problem with Most WooCommerce Visibility Solutions

Many plugins simply hide products visually while they remain accessible through:

  • Direct product URLs
  • WordPress search results
  • WooCommerce search
  • Product archives
  • REST API endpoints
  • Third-party search plugins

This means that users may still discover products that were supposed to remain private.

And it’s not good, it’s not what you want.

The Better Approach: Hide Products at the Query Level

Instead of hiding products on frontend after they’re loaded, this plugin works on query level and prevents being retrieved by WordPress or WooCommerce.

This provides:

  • Better performance
  • Improved security
  • Cleaner search results
  • No accidental product leaks
  • Consistent behavior across your entire store

Final Thoughts

If you need to hide WooCommerce products from guests, using a query-level role-based visibility solution is one of the most reliable approaches.

Whether you’re building a B2B store, a members-only marketplace, or a private product catalog, Hide Products by User Role for WooCommerce provides flexible controls without sacrificing performance or requiring custom development.

More posts