Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16588

    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>';
    }

    #92100

    To be honest this is beyond the scope of our support forum. I’d suggest to contact the plugin developers here: http://www.woothemes.com/support-forum/?viewforum=131 or to hire a skilled freelancer for this task.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Add User Details to New Admin Order Email’ is closed to new replies.