The method Restrict purchase of matched products makes matching products impossible to buy when the rule's conditions match: WooCommerce treats them as not purchasable, so they can't be added to the cart, and matching variations are hidden. Use it for members-only or wholesale-only products.
How do I stop guests from buying some products?
- Go to WooCommerce > Pricepep > Product Pricing and click Add Rule.
- Set Method to Restrict purchase of matched products.
- Under Products, choose the products, for example Product category in list "Members only". Leave it empty to restrict every product.
- Under Conditions, click Add Condition, choose Is logged in and select no.
- Click Save Changes.
Guests now see the products but can't buy them; logged-in customers can.
More examples
- Wholesale-only products: Products Product tags at least one of selected "wholesale", Conditions User role not in list Wholesale.
- Variations for one role only: Products Product variation in list (the variations), Conditions User role not in list (the role). Those variations are hidden from everyone else.
- Seasonal stop: Products Product category in list "Fireworks", Conditions Date from (a date).
What does the customer see?
The product page shows the product and its price but no way to buy it (themes show this in their own way). Restricted variations disappear from the variation choices. Pricepep doesn't add a message explaining why; add one in the product description if needed.
Can I hide the price instead?
No, Pricepep can't hide prices. A catalog mode plugin does that. See hiding prices. To give the same customers their own prices instead, see wholesale prices by user role.
Frequently asked questions
Does Restrict purchase hide the product or its price?
No. The product page and price stay visible; the product just can't be bought. Matching variations are hidden. Hiding prices needs a catalog mode plugin.
Can I allow only logged-in customers to buy?
Yes. Restrict purchase of matched products with the condition Is logged in set to no.