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 (April 21, 2016)

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)
1180.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

  • Email:test@test.com
  • Tel:345435

Billing address

Rodolfo Melogli
dfgdfg
dfgdfg
dfgfdgfg
00000
ghsfghgfh

Shipping address

Rodolfo Melogli
dfgdfg
dfgdfg
dfgfdgfg
00000
ghsfghgfh

woocommerce_email_footer($email)

WooCommerce Email Default add_actions


// --------------------------------------
// These are actions you can unhook/remove!
// You must pass $object to the function
// e.g. function remove_header( $object ) {
//   remove_action....
// }
// --------------------------------------

// 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 );

Share:

Leave a Reply