This topic has 1 reply, 2 voices, and was last updated 6 years by Kieran_SQ.

  • Author
  • #178860
     dlx
    Participant

    Hallo!

    I´d like to display a page after a user deletes his account. Actually the users are send to the homepage.

    I´d tried this code in functions.php – without success:

    COPY CODE
    // redirect after account delete
    
    function action_bp_members_delete_account_after_submit(  ) {
    
    wp_redirect( "/goodbye/");
    
    };
    
    add_action( 'bp_core_deleted_account', 'action_bp_members_delete_account_after_submit', 10, 0 );

    Do you have any idea how to get this done? Or add this as a feature – think this could be very useful for communities.

    Best regards,
    Jan

    #178901
     Kieran_SQ
    Moderator

    Hi,

    Thanks for reaching out to us today about custom development, the cleaned up version of your above could would be

    COPY CODE
    // redirect after account delete
    function action_bp_members_delete_account_after_submit() {
    
    wp_redirect(home_url( '/goodbye/' ));
    
    };
    
    add_action( 'bp_core_deleted_account', 'action_bp_members_delete_account_after_submit', 10, 0 );

    However I don’t think it is possible to redirect on bp_core_deleted_account, you should reach out to the BuddyPress support / dev teams at https://buddypress.org/support/ to see what their thoughts are.

    Thanks,

    Kieran.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?