Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

The default setup of Paid Memberships Pro configures all members as users with the default role (under Settings > General) and (selected) membership level. When a user cancels membership, the user’s subscriber account remains and will show up under the Users list in the WordPress Admin.

The code recipe below will delete that user account upon cancellation.

This content requires a premium membership plan.