Correct function to get the user’s latest Woocommerce Subscription?

use this code $users_subscriptions = wcs_get_users_subscriptions($user_id); retrieve the data using foreach foreach ($users_subscriptions as $subscription){ if ($subscription->has_status(array(‘active’))) { echo $subscription->get_id(); } } There is some function to access subscription data. like get_id(),get_date(‘end’) (to get last date of subscription ). I hope its help you well.

Select subscriber as author of post in admin panel?

This is a simple hack I wrote in a similar situation. It will display all the Subscribers in the Author dropdown on edit/add post/page, from where you can select any one you want. I think it should work for you… add_filter(‘wp_dropdown_users’, ‘MySwitchUser’); function MySwitchUser($output) { //global $post is available here, hence you can check for … Read more