Home » WooCommerce Visual Hook Guide: Emails

WooCommerce Visual Hook Guide: Emails

by Tutor Aspire

WooCommerce Customizers: the Visual Hook Guide is back 🙂

Here’s a visual HTML hook guide for the WooCommerce Emails. This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations.

Let me know in the comments if this resource it’s helpful and how! Enjoy 🙂

WooCommerce Email Hooks

New customer order

woocommerce_email_header ($email_heading, $email)

You have received an order from fdgfg dfgfdg. 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 #19950 ()

Product Quantity Price
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 €180.49(ex. VAT)
Subtotal: €180.49(ex. VAT)
Shipping: Free Shipping
Tax: €41.51
Payment Method: Direct Bank
Transfer
Total: €222.00

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

Tutor Aspire
dfgdfg
dfgdfg
dfgfdgfg
00000
ghsfghgfh

Shipping address

Tutor Aspire
dfgdfg
dfgdfg
dfgfdgfg
00000
ghsfghgfh

woocommerce_email_footer($email)

WooCommerce Email Default add_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 );

You may also like