How to restrict content based on product purchase for specific woocommerce category?
I need a pay per post system for specific woocommerce products category.
Hi, my site is currently running the latest version of WordPress V5.4.1 with the woocommerce V4.0.0 plugin installed.
With woocommerce, by default the product page is accessible to all users. I would like to be able to restrict access to the product page to users who have already purchased the product. That is to say after adding it to the cart from the store and paying at checkout.
Product = a post type Woocommerce plugin link = https://fr.wordpress.org/plugins/woocommerce
So, I would like to display the content of the product page only if the product has already been purchased by the user. That is, if the product is contained in the user’s order list.
I would like to apply this system only to products of certain specific categories to be defined.
As for the restriction of products, which are not yet purchased by the user, I would also like to have the possibility of defining a redirect page whose content remains under my sole responsibility.
For this, I will expressly need a small parameter in the rediction link which would display the ID of the product to buy in this way for example: **_redirect_id=PRODUCT_ID (It will be useful for me to display on the page, some product information by the get method 😉 Like this: https://zupimages.net/up/20/22/b2wf.png
I found from my research, certain articles which deal with the subject but which always seem vague to me. Articles link:
I know it shouldn’t be too complicated if you merge some of the information from the links above, but I admit that I really don’t know how to go about it, I’m worried above for days .. Thanks in advance for your help !