I am using WooCommerce subscriptions.
How can I get all subscriptions (with start date and end date) in a lists from one specific date to another date?
Example 01/09/2016 to 15/09/2016
Thanks
I am using WooCommerce subscriptions.
How can I get all subscriptions (with start date and end date) in a lists from one specific date to another date?
Example 01/09/2016 to 15/09/2016
Thanks
Here is an example of a function that will display a list of all active subscriptions from one date to another, in a formatted html table. In this example, you will get for each subscription: the subscription ID, the date, the customer ID and the customer name (You can customize the code to get what you want).
So this function has 2 date parameters. For usage and specifications see the section at the end.
The function code:
This code goes in function.php file of your active child theme (or theme) or also in any plugin file.
USAGE (example):
You will have to respect this numerical date format:
YEAR-MONTH-DAY
This will display a list of all active subscriptions from 2016-06-19 to 2016-09-21…
This code is tested and works.