I am working with a company that provides online content in the form of semesters you pay to access. The semester is set up like a product that you purchase through WooCommerce.
We've been applying a convoluted and inefficient method to grant access to the semester's tutorials, but it's the way it's been done since its inception. However, they are coming out with another semester this week and this process will no longer be viable. Users now have multiple options to choose from, and whichever class they choose needs to be unlocked while keeping the alternative semesters locked.
I feel the best way to grant them access to their chosen class is to query the database to find information on the user and which semester they purchased. That may require
$wpdb->, combining tables, or there may be a much simpler answer I'm just not seeing.
I know that a woocommerce purchase is a custom post type called shop order, what I don't know is what column identifies the specific product, how to tie a user to that product, and how to create the database query to pull the users. Any help would be greatly appreciated.