A well-designed membership cancellation process is key to keeping your customers happy and your operations running smoothly. With Paid Memberships Pro powering your memberships, you’ve got everything you need to handle cancellations, whether they are initiated by the site admin or by a member directly.
With PMPro, members that cancel a recurring membership will have an expiration date set through the end of their prepaid membership term.
If you prefer the old logic, this post includes a code recipe to immediately cancel membership when a member uses the Membership Cancel form on your site.
Understanding The Core PMPro Cancellation Processes
Administrator-Initiated Cancellations:
Administrators can cancel a membership directly through the Members > Edit Member > Memberships panel. Navigate to the membership you want to cancel and click the “Cancel” button. This action will immediately cancel the active recurring payment at the payment gateway and immediately remove the membership access. You’ll also get the option to refund the last payment.

Member-Initiated Cancellations:
Members can cancel their own memberships through their Membership Account page. A member will see a “Cancel” link in their account and will be taken to a page to confirm that they indeed want to cancel the membership. By default, this process will immediately cancel the recurring payments at the payment gateway and set the membership to expire on the next payment date. If the member already has an expiration date or is canceling a free level, the membership will be canceled immediately.
About the Code Recipes
This code recipes below change the default cancellation behavior when the member initiates the cancellation.
By returning false on pmpro_cancel_on_next_payment_date, the membership benefits will terminate immediately.



Code Recipe #1: Cancel All Levels Immediately
Code Recipe #2: Cancel Specific Levels Immediately
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
How to Customize This Code Recipe
Code Recipe #1 works out of the box. Just drop it into your site as-is. Once active, any membership level will be canceled immediately upon member request, regardless of whether prepaid time remains on the account.
Code Recipe #2 requires one small adjustment to target specific levels. On line 25, update the $cancel_immediately_levels array to match the membership levels you want to cancel immediately. Any levels not included in the array will continue to follow PMPro’s default cancellation behavior, expiring at the end of the prepaid term.


