I have a booking system where the student books and pays their lessons. So far its easy with Zapier etc. I would like to let the students buy a package of 5 lessons. Book them and see whats left on their account. If they cancel, the account adjusts, Have been struggling. Today i have one table with products, on table with packages and a table with package-products related to a Package ID.
What are you using as the payment gateway?
Regardless, you can just have the package containing a list of lesson IDs, as I imagine. That can drive your visibility conditions on which lessons they can see after paying.
Im Using zapier and payhere/stripe. Have made my own script. When admin create a package the system creates a copy of the product with a package id. So creating, showing and selling the package is no problem. The thing is that the customers account afterwards should contain 5 lessons and counting down when booking them and adding one when cancel the booking.