I have a courses CPT and a lesson CPT. Users buy courses to get access to lessons. Each lesson is a related post of a course and the fields for related posts sync. If a user visits a single lesson page directly, I want to show a widget saying the content is available to people who have bought the course. There is a “User has bought product” condition but it doesn’t allow to use dynamic tags (on the single lesson page, I need to show the widget if the user has bought the related post which is a course, not the lesson itself since users buy courses to get access to lessons).
I was thinking a way around this is to have a related post in the courses CPT called “participants” and add user profiles to it with custom code whenever a user buys a course. Then I would need to show the widget in the lesson single page if the user profile ID is contained in the related post called participants in the course for that lesson. Is this doable?
©2025 Created with 27collective LLC. All rights reserved