• Resolved darmou55

    (@darmou55)


    Hi,

    I try to modify subject and content of welcome email that users receive after user email validation.

    I found on support forum this code that I pasted in a new plugin:

    
    add_filter ( 'wppb_register_user_email_subject_without_admin_approval', 'wppbc_custom_email_confirmation_success_subject', 20, 4 );
    function wppbc_custom_email_confirmation_success_subject($user_message_content, $email, $password, $user_message_subject, $context ){
        $new_message = 'This is my new email body. This is your email address ' . $email . '. Thank you for registering.';
    
        return $new_message;
    

    But, with this code I only success to modify subject.. Content of the mail remains the same..

    Do you have an idea?

    thank you in advance for your help

    • This topic was modified 8 years, 3 months ago by darmou55.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Georgian Cocora

    (@raster02)

    Thread Starter darmou55

    (@darmou55)

    Hello
    As I said in my post I already try it and it modify only email subject.
    Email content remain the same

    Plugin Author Georgian Cocora

    (@raster02)

    There are 2 snippets of code in the post I linked. First one is for the subject, second one is for the content.

    Regards.

    Thread Starter darmou55

    (@darmou55)

    Excuse me for disturbing, the code for subject work well, but code for content return an empty body email.

    add_filter ( 'wppb_register_user_email_message_without_admin_approval', 'wppbc_custom_email_confirmation_success_message', 20, 4 );
    function wppbc_custom_email_confirmation_success_subject($user_message_content, $email, $password, $user_message_subject, $context ){
        return 'new_message';
    }
    Plugin Author Georgian Cocora

    (@raster02)

    Hello @darmou55,

    The filters aren’t used correctly there.
    Here you go:

    add_filter ( 'wppb_register_user_email_subject_without_admin_approval', 'wppbc_custom_email_confirmation_success_subject', 20, 5 );
    function wppbc_custom_email_confirmation_success_subject($user_message_content, $email, $password, $user_message_subject, $context ){
        return 'new_message';
    }
    
    add_filter ( 'wppb_register_user_email_message_without_admin_approval', 'wppbc_custom_email_confirmation_success_message', 20, 5 );
    function wppbc_custom_email_confirmation_success_message($user_message_content, $email, $password, $user_message_subject, $context ){
        return 'new_message';
    }

    The first one is for the subject, the second one is for the message. They might look the same but they aren’t.
    I just tested this and it works correctly.

    Regards.

    Thread Starter darmou55

    (@darmou55)

    Thank you a lot!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Welcome email’ is closed to new replies.