WooCommerce Subscriptions: Reduce churn from failed renewals

When WooCommerce Subscriptions generates a renewal, it attempts to charge the payment method associated with that subscription. If that payment method fails, the renewal order is set to a pending status and the customer is notified via email that their renewal failed.

Ideally your customer wants to stay subscribed, in which case they will follow the link in the email and pay for their renewal order- likely with a different credit card if their previous card is expired or invalid.

You might assume that WooCommerce Subscriptions would then update the payment method associated with the subscription, so that future charges would go on this new valid payment method. But unfortunately that does not happen. The renewal order is paid for with the new payment method, but the older payment method that failed is still associated with the subscription- and that’s what will be attempted on the next renewal.

However, if you’d like to save the customer from having to log in and manually pay for their next renewal again, you can add some custom code to copy the new payment method and token to the subscription when renewal is paid for with a different payment method.

Here’s the code on GitHub: https://github.com/DevPress/woo-update-subscription-token-renewal/.

Leave a Reply