Hi, I'm setting up a Classified Listings website where users can register and publish their business listings.
For example a Plumber will publish a listing with a logo, a description and a phone number.
On the frontend not registered user can see all the published listings and contact them.
I setup this with Toolset, where I built my Business CPT, I added all the necessary custom fields, I created forms to let registered users add their business listing and Views to display the content on the front-end.
I want to offer also a Premium listing with recurring payments, so that the registered user can add some extra custom fields to his published listing (for example more photos or website url).
This is why I bought WooCommerce Subscriptions and I follow your step by step guide here https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/how-to-use-the-woocommerce-subscriptions-plugin-with-toolset/.
Now My problem is how to associate the published listing to the premium subscription, so I can display or not Premium custom fields depending on Subscription status. The main problem is what happens with the subscription auto renew, how can I check is the subscription is still active or not?
As a user can buy more than one subscription, I cannot just use the assigned role, I need to associate a specific subscription to a specific listing.
What I'm looking for is some hook or shortcode I can use to check subscription status and ID, so I can save them in some listing custom fields when they are generated or renewed. In this way I can check them to display or not Premium fields.
I found that Views can work with Products and Orders CPTs. On WooCommerce Subscriptions documentation thay say that Subscriptions ara a special Order, but if I set up a Order view, it doesn't load Subscriptions in the loop, only regular Orders.
Can you help me?
thanks