Prevent non-members from viewing product prices or purchasing products from your WooCommerce store with this Code Recipe.

Turn your store into a product catalog only for non-members.

How it Works

If a user does not have an active membership level, this code recipe will turn your WooCommerce site into a “Catalog” only. Non-members will be able to view your products, but will not be able to:

  • View prices
  • Add products to their shopping cart, or
  • Purchase products.

All product details, including the Product Description, will be displayed.

If a user has an active membership, they will be able to browse your store normally. Members can see all the product information with price, add products to cart, and complete checkout.

This code is most used by sites that offer wholesale pricing and want to require members to have an active membership to shop.

Screenshot showing before and after of non-members from viewing product prices and purchasing

Before and after code is applied

Code Recipe

Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

Alter this code to fit your needs or get in touch with in the Member Support Area for additional guidance.

Note: This code recipe will not work if you are using our WooCommerce Integration Add On to sell membership levels as products.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo