At some point, every membership site owner will experience failed subscription payments. There can be many reasons for this: perhaps a member simply intends to cancel or it was purely accidental and the member never updated their billing information.

You can increase your chances of recovering the member’s account and failed payment by redirecting members to a custom page on login.Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

About the Recipe

A money-making membership site relies on successfully processed recurring payments—it can really impact your churn rate when subscription payments fail. Failed payments result in a loss of income and could leave you confused as to why the member failed to update their payment method and simply “went away”.

There are a couple of reasons why you might want to consider redirecting members who have failed payments to a specific page when they attempt to login to your site, namely:

  • You won’t need to rely 100% on failed payment emails that are sent out by PMPro and your payment gateway.
  • You want to recover and retain as many members as possible.
  • You’ll be sure that members who have a recent failed payment can update their account as easily and quickly as possible.
  • It gives you one last attempt to win over members who may be on the fence about continuing their membership.

What page to redirect to?

There are a few destinations you should consider when setting up your failed payment redirection strategy.

First, why not try to redirect your members directly to the default “Membership Billing” page. This will immediately allow them to update billing details as soon as possible.

Alternately, you could create a completely new page that politely notifies the member of their recent failed payment. This page can even entice members to stay active by including a special offer once they update their account’s payment method.

The code recipe below redirects failed payment members to a page with the slug /payment-failed/. To use this recipe, you’ll need to create a page with this same slug or adjust the $failed_payment_redirect_url = site_url( 'payment-failed' ) line of code to point to your page of preference.


Need Some Help?

We offer support for implementing this code recipe into your website. Reach out to our support engineers over on our Member Support Area.


The Code Recipe

Note: The Failed Payment Limit Add On is deprecated but the recipe should still work if the deprecated plugin is active.

Adding the recipe to your website

Copy and paste this code recipe into a helper PMPro Customizations plugin.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo