Cancel account from Membership2Pro account page

I would like to add an option to the Membership2Pro account page to delete a user account at the very bottom of the page, would this be possible?


  • Milan
    • WordPress Wizard

    Hello @alexstine,

    I hope you are well today and thanks for asking us. :slight_smile:

    We need to leverage third part plugin to achieve this. :slight_smile: So first of all please,

    #1) Install Delete me plugin.
    #2) Go to plugin's settings page via Settings > Delete me . Check role which users will be allowed to delete their account.
    #3) Now add this bit of code in your functions.php file or its child theme's functions.php file to prevent changes lost during update.

    add_action( 'ms_view_account_activity_bottom', 'wpmudev_ms_view_account_memberships_top', '', 2 );
    function wpmudev_ms_view_account_memberships_top( $membership, $this ){
    	echo do_shortcode('[plugin_delete_me /]' );
    	echo '<br>';

    That's it. Save file and view account page.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.