Skip to:
Content
Pages
Categories
Search
Top
Bottom

Customizing Buddypress Activation Email (old Hook not working)


  • SilverSunrise
    Participant

    @silversunrise

    Dear Forum Members,

    I am trying to customize the standard buddypress activation email that is sent upon registration of a new user (I am using latest WordPress and Buddypress Versions).

    After following the suggestions on https://websistent.com/custom-buddypress-activation-email/, I did manage to edit the subject line with following snippet in wp-content/plugins/bp-custom.php:

    add_filter( 'bp_core_signup_send_validation_email_subject', 'custom_buddypress_activation_subject', 10, 2 );
     
    function custom_buddypress_activation_subject( $subject, $user_id ) {
        $user = get_userdata( $user_id );
        return $user->user_login . ' – Activate your ' . get_bloginfo( 'name' ) . ' account';
    }

    This works fine.

    However, the following snippet for customizing the message of the email does not work:

    add_filter( 'bp_core_signup_send_validation_email_message', 'custom_buddypress_activation_message', 10, 3 );
     
    function custom_buddypress_activation_message( $message, $user_id, $activate_url ) {
        $user = get_userdata( $user_id );
        return "Hi $user->user_login,
    Thanks for registering! To complete the activation of your account please click the following link:
    $activate_url
    Thanks,
    Jesin";
    }

    I have tried the approach, as outlined here https://buddypress.org/support/topic/customizing-buddypress-activation-emails-outside-and-still-get-activation-key/, too. It did not work neither.

    I am not sure whether this hook (bp_core_signup_send_validation_email_message) is still working or if there is a better way to hook into this message.

    Could anybody shed some light on this issue and help me with customizing the activation email content while still prodiving activation link and activation key?

    Thanks a lot and kind regards
    Joachim

  • You must be logged in to reply to this topic.
Skip to toolbar