Want to show a link to log out only if a user is logged in and vice versa?
Try the below code, paste it directly into your template on WordPress.
Tag: login
User must be logged in to view WooCommerce Products
Sometimes, you want a good old simple way to restrict customers who don’t have accounts to view your products on your WooCommmerce website. A reason why I’m setting this up for a client is because they have two websites. One of them is for the public, the second is for wholesale customers who need to have accounts before they can access the products. Rather than purchasing another plugin, there’s a fast way to make this work without spending a cent.