New User Notification Email Include Name
-
I’ve modified the New User Notification Email to include address details entered during the shopping cart of WooCommerce, but I also need to include the first and last name.
The following code will print the last name matching the hard coded ID…
$user_last = get_user_meta( 5952, 'last_name', true ); $message .= sprintf(__('Last Name: %s'), $user_last) . "\r\n\r\n";
Why does the following not print the last name matching the new users ID?
$user_last = get_user_meta( $user_id, 'last_name', true ); $message .= sprintf(__('Last Name: %s'), $user_last) . "\r\n\r\n";
The following prints the correct ID that I’m trying to target, so this makes little sense to me…
$message .= sprintf(__('User ID: %s'), $user_id) . "\r\n\r\n";
If anyone has any suggestions, I’d be very grateful.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘New User Notification Email Include Name’ is closed to new replies.