I a need to create a wordpress template to collect all Woocommerce subscriptions, but I'm having trouble with the documentation. I need to know which files to import and which function to call.
Thank you in advice.
I a need to create a wordpress template to collect all Woocommerce subscriptions, but I'm having trouble with the documentation. I need to know which files to import and which function to call.
Thank you in advice.
You can use the built in function wcs_get_subscriptions($args) and pass the following $args
$args = array( 'subscriptions_per_page' => -1 );
$subscriptions = wcs_get_subscriptions( $args );
You can even filter by subscription status also in the arguments.