Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created February 1, 2024 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/11978a674f39c3974239b388e1b6eed0 to your computer and use it in GitHub Desktop.
Save braddalton/11978a674f39c3974239b388e1b6eed0 to your computer and use it in GitHub Desktop.
Woocommerce Email 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 );
add_action( 'woocommerce_email_order_details', array( $this, 'generate_order_data' ), 20, 3 );
add_action( 'woocommerce_email_order_details', array( $this, 'output_email_structured_data' ), 30, 3 );
// New Order email only
add_action( 'woocommerce_email_footer', array( $this, 'mobile_messaging' ), 9 );
// Customer emails if BACS / COD / cheque payment
add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment