The code in this download folder hides the content added to the long description and only shows it to logged in customers who have bought the product. If the user is not logged in or hasn’t purchased the product, the content is hidden. In this case we hide the virtual product, video, from the single product page for logged in customers only.
In this example, we hide a video and make it visible too logged in paying customers who have bought the product.
Installation
There’s only 1 step : Upload the woocommerce folder to your child themes root directory.
You can customise the message on line 54.
Include – Exclude User Roles
If you want to include a specific user role like admins, change the code on line 43 to this :
Leave a Reply