GideonKimani,
Did you find a solution? I’m attempting to do the same thing. I’ve spent days and days trying to figure out how to do this.
1. I added a custom field to the Woocommerce CPT: shop_order.
2. I then added a new field to the checkout form using action hook ‘woocommerce_after_order_notes’. This field is a select (dropdown) of all custom post types… that the logged in user is the “author” of.
3. I then made the new field on the checkout form required using action hook ‘woocommerce_checkout_process’.
4. Then I update_post_meta(), on the shop_order Custom Post Type. So it now has the ID of the linked Service_Profile (CPT).
5. I’m now building fields on the Service_Profile CPT to display things like: Subscription Status, Subscription ID, Amount, etc…
I will be using action hooks from the subscriptions plugin, like ‘subscriptions_activated_for_order’, in order to update post_meta on my CPT’s.
The last step will be to only display the CPT (Service Profiles) on the front of the site if the custom_field showing subscription status is “Active”.
It would be great if someone could explain to me how to just turn my CPT into products, so I could just have everything built into 1 custom post type… instead of 2 linked ones.
Does anyone else have a suggestion on how to do this better?