The pluggable core function wp_new_user_notification
is changed since 4.3 and all plugins or functions that replaces this MUST update – and change the complete flow of mail sent.
FRONT END REGISTRATION:
Digging in to this is a hard shell to break, but we did succeed! The plain_password never passes the function anymore and you need to build a completetly own flow.
Using do action on validate_password_reset
you can catch users who HAVE NOT set their password throug the default_password_nag
filter. This NAG is true as long they not clicked on the link in the email and set their own successful password.
Something like:
add_action( 'validate_password_reset', 'ua_validate_password_reset', 10, 2 );
function ua_validate_password_reset($errors, $user){
$c = get_user_option('default_password_nag', $user->ID);
if($c && isset($_GET['action']) && $_GET['action'] == 'rp'){
// do actions and filters on RESET PASSWORD LOAD PAGE for linked from first email password users...
} else if($c){
// Fires after password submitted - on successful Your password is reset - login
// But the NAG is not FALSE until AFTER the filter below:
// Only for FIRST TIME submitters (had no pass before)
add_action( 'password_reset', 'ua_password_set_notification', 10, 2 );
}
}
function ua_password_set_notification($user, $new_pass) {
// build your Welcome wpmail content here
// The $new_pass contains the plain text password.
// NOTE: $user object NOT user_id is in use
}
Hope it points the way