Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress change email new user template

//Use the plugin: Welcome Email Editor
// OR:
// CHANGE DEFAULT TEXT MAIL FOR NEW USERS (sent to admin)
add_filter( 'wp_new_user_notification_email_admin', 'custom_wp_new_user_notification_email', 10, 3 );
function custom_wp_new_user_notification_email( $wp_new_user_notification_email, $user, $blogname ) {
    $wp_new_user_notification_email['message'] = sprintf( "%s has been registered!.", $user->user_email );
    return $wp_new_user_notification_email;
}

// CHANGE DEFAULT TEXT MAIL FOR NEW USERS (sent to user)
add_filter( 'wp_new_user_notification_email', 'custom_wp_new_user_notification_email_user', 10, 3 );
function custom_wp_new_user_notification_email_user( $wp_new_user_notification_email, $user, $blogname ) {
    $wp_new_user_notification_email['message'] = sprintf( "%s ha sido registrado en ASTAC!.", $user->user_email );
    return $wp_new_user_notification_email;
}
 
PREVIOUS NEXT
Tagged: #wordpress #change #email #user #template
ADD COMMENT
Topic
Name
6+4 =