Replies: 0
Hello all,
I’m using Woocommerce Subscriptions plugin in my Woocommerce site. I want to post the new renewal date for a subscription to an external API when a subscription is renewed. I’m trying to use the ‘woocommerce_subscription_renewal_payment_complete’ action hook so whenever a subscription is renewed I can access the $subscription object and the $last_order object. But when I try to get the $subscription->get_date(‘nex_payment’) date, it will always return the last renewal date and not the next renewal date. I looks like the $subscription has not really been updated before this hook and the ‘next_payment’ date is still not updated to the next value when firing this action hook.
Does anybody know how to get the real ‘next_payment’ date after a renewal has been completed?
Thank you!