Allow WooCommerce customers to read private posts/products

Here is a quick snippet to allow WooCommerce users to read/access private posts or private products. Pretty useful when you want to create special offers for some existing customers only. Simply place that snippet in functions.php in your theme folder:

Enjoy!

About the author

Remi Hey! My name is Rémi Corson, I'm a French WordPress Developer, I code stuff and I write from time to time ;-) Buy a coffee
Show your support

Related Posts

1 comment

  1. billium99:

    Hi Remi – great site! I wanted to let you know – this snippet works to make the private products visible, but is not a complete solution, since people can see the products but cannot buy them. Is there a small tweak to allow these products to also be added to the cart?

    Thanks

    Bill

Leave a Reply