Hi There,
I've been trying to add three fields under "Customer Details" in admin-new-order.php to no avail, obviously calling it correctly is too advanced for the likes of me!
Basically what I want is:
Account: $user_login
Name: $display_name
Email: $user_email
While the existing order template does have the $billing_email, I have an issue with that aspect of the WooCommerce framework as customers can edit the $billing_email field in My Account yet it doesn't update their actual $user_email, hence creating two different email addresses on file.
I have created a custom Frontend Edit Profile so users can edit $user_email but now my customer wants the abovementioned three fields to write to the Admin New Order email.
Can anyone help, please? I'm sure it's very simple! ;) Here is one example of the MANY things I tried:
add_action( 'get_user_details', 10, 2 );
function get_user_details( $user_id, $user_login, $display_name, $user_email )
{
$user = get_userdata( $user_id );
echo '<p><strong>Account:</strong>'.$user_login.'</br>';
echo '<p><strong>Name:</strong>'.$display_name.'</br>';
echo '<p><strong>Email:</strong>'.$user_email.'</p>';
}














