[groups_woocommerce_subscriptions_table columns=”title,start_date,status,groups” status=”*”]
function active_subscription_list($from_date=null, $to_date=null) { // Get all customer orders $subscriptions = get_posts( array( ‘numberposts’ => -1, ‘post_type’ => ‘shop_subscription’, // Subscription post type ‘post_status’ => ‘wc-active’, // Active subscription ‘orderby’ => ‘post_date’, // ordered by date ‘order’ => ‘ASC’, ‘date_query’ => array( // Start & end date array( ‘after’ => $from_date, ‘before’ => $to_date, ‘inclusive’ => true, ), ), ) ); // Styles (temporary, only for demo display) should be removed echo ““; // Displaying list in an html table echo “” . __( ‘Number ID’, ‘your_theme_domain’ ) . “ | ” . __( ‘Date’, ‘your_theme_domain’ ) . “ | ” . __( ‘User ID’, ‘your_theme_domain’ ) . “ | ” . __( ‘User Name’, ‘your_theme_domain’ ) . “ | $subscription_id | $subscription_date | $customer_id | $customer_name | “; } echo ‘
---|