Currently having a listing site that uses Woocommerce
and woo subscriptions. There are two customers – free and premium. In the user-dashboard, I would like to hide from the free users a specific area that is visits statistics. I would like to redirect this page to another one for the free members. Can someone help to solve this? I think I need a
Woocommerce
function that checks if the user has a product "11344" (free product that is already purchased/owned)
Javascript
redirecting specific page to another one if the user has the product
How to achieve this?
2
Answers
normally woocommerce add some meta tags. I would recommend to check the database for those tags for premium and free users and code a "if else" statement in the template for both like:
This way you are not forced to use javascript and reduce the loading time for the page.