I have been creating a plugin and I am trying to pull all woo commerce subscriptions and the variations within the subscription product into a drop down list.
I have successfully pulled the top level product into the drop down list but for some reason the variations of that product don't display on my list.
Any ideas?
This is the code I believe that is adding the products to the list. Do I need to make changes to the type in order to add the variations to the list and not just the top level product?
// get product list...
$query = new WC_Product_Query( array(
'limit' => -1,
'orderby' => 'date',
'order' => 'DESC',
'return' => 'all',
'type' => array('variable-subscription', 'subscription')
) );