How it Works

If a user has X failed payments without a successful order in between, their subscription is cancelled.


Installation

  1. Upload the ‘pmpro-failed-payment-limit.php’ to the ‘/wp-content/plugins/’ directory of your site.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

Then, set the rule to cancel membership after X failed payments. After installing and activating the plugin, you must set a constant for ‘PMPRO_FAILED_PAYMENT_LIMIT’ (either in your theme’s functions.php file or helper customizations plugin) for the number of failures.

define('PMPRO_FAILED_PAYMENT_LIMIT', 3);