• Resolved Seamus

    (@seamus)


    My client needs their new order emails to have the address and notes fields to the top of the email.
    I can’t see a way to do this with the admin-new-order.php template – as in I can’t see where the notes and address fields are.

    Any help or directions of where to go greatly appreciated

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support EtienneP a11n

    (@etiennep)

    Hi there!

    You would need to create a template override for that email and just move some of the do_actions in the template around.

    If you open the email under WooCommerce > Settings > Emails > New Order you will see an option right at the bottom to copy the template to your theme and the location if will be copied to – https://docs.woocommerce.com/document/template-structure/#section-1

    New-order-email
    Link to image: https://d.pr/i/5qJw8x

    When you edit the template then, you can move the do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); to the top like this and it will show the customer details first;

    /*
     * @hooked WC_Emails::customer_details() Shows customer details
     * @hooked WC_Emails::email_address() Shows email address
     */
    do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
    /*
     * @hooked WC_Emails::order_details() Shows the order details table.
     * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
     * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
     * @since 2.5.0
     */
    do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
    
    /*
     * @hooked WC_Emails::order_meta() Shows order meta data.
     */
    do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );

    The order notes are part of do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); and you would need to reach out to a developer if you would like to show that somewhere else.

    Plugin Support EtienneP a11n

    (@etiennep)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘New order emails to admin – move address and notes fields to the top’ is closed to new replies.