WooCommerce Emails Visual Hook Guide 2024

Leave a comment / By John Cook

With this WooCommerce emails visual hooks guide [year] you will be able to customise your email templates with ease and speed. Making customisations to your WooCommerce emails can allow you to not only personalise the email template to your requirements but also add necessary details for your customer, such as providing information that they acknowledged the terms and conditions or they confirmed their order has backordered items.

This WooCommerce emails visual hooks guide will allow you to not only add details, but also remove some hooks you no longer need. Some sections of the email form part of the template and will require overrides in the child theme for additional enhancements.

New customer order

woocommerce_email_header ($email_heading, $email)

You have received an order from P. Sherman. The order is as follows:

woocommerce_email_order_details ($order, $sent_to_admin, $plain_text, $email)

woocommerce_email_before_order_table ($order, $sent_to_admin, $plain_text, $email)

Order #12345 (October 11, 2022)

ProductQuantityPrice

Simple Product

woocommerce_order_item_meta_start($item_id, $item, $order, $plain_text)

woocommerce_order_item_meta_end ($item_id, $item, $order, $plain_text)

1$49.00(ex. VAT)
Subtotal:$49.00(ex. VAT)
Shipping:Free Shipping
Tax:$4.90
Payment Method:Direct Bank
Transfer
Total:$53.90

woocommerce_email_after_order_table ($order, $sent_to_admin, $plain_text, $email)

woocommerce_email_order_meta ($order, $sent_to_admin, $plain_text, $email)

woocommerce_email_customer_details ($order, $sent_to_admin, $plain_text, $email)

Customer details

Billing address

P. Sherman
42 Wallaby Way
Sydney, NSW, Australia
2000

Shipping address

P. Sherman
42 Wallaby Way
Sydney, NSW, Australia
2000

woocommerce_email_footer($email)

WC Success Academy – Powered by WooCommerce

WooCommerce Emails Visual Hook Guide 2024 Default Actions

                        
                            // --------------------------------------
// These are actions you can unhook/remove!
// You must use $object inside remove_action
// Where $object = WC()->mailer();
// --------------------------------------
 
// Email Header, Footer and content hooks
 
add_action( 'woocommerce_email_header', array( $object, 'email_header' ) );
add_action( 'woocommerce_email_footer', array( $object, 'email_footer' ) );
add_action( 'woocommerce_email_order_details', array( $object, 'order_details' ), 10, 4 );
add_action( 'woocommerce_email_order_details', array( $object, 'order_schema_markup' ), 20, 4 );
add_action( 'woocommerce_email_order_meta', array( $object, 'order_meta' ), 10, 3 );
add_action( 'woocommerce_email_customer_details', array( $object, 'customer_details' ), 10, 3 );
add_action( 'woocommerce_email_customer_details', array( $object, 'email_addresses' ), 20, 3 );
                        
                    

Was WooCommerce Emails Visual Hook Guide 2024 helpful? Why not show your support and buy me a coffee?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Scroll to Top
×