woocommerce_email_customer_address_section
Fires after the core address fields in emails.
Usage
add_action( 'woocommerce_email_customer_address_section', 'wp_kama_woocommerce_email_customer_address_section_action', 10, 4 ); /** * Function for `woocommerce_email_customer_address_section` action-hook. * * @param string $type Address type. Either 'billing' or 'shipping'. * @param WC_Order $order Order instance. * @param bool $sent_to_admin If this email is being sent to the admin or not. * @param bool $plain_text If this email is plain text or not. * * @return void */ function wp_kama_woocommerce_email_customer_address_section_action( $type, $order, $sent_to_admin, $plain_text ){ // action... }
- $type(string)
- Address type. Either 'billing' or 'shipping'.
- $order(WC_Order)
- Order instance.
- $sent_to_admin(true|false)
- If this email is being sent to the admin or not.
- $plain_text(true|false)
- If this email is plain text or not.
Changelog
Since 8.6.0 | Introduced. |
Where the hook is called
woocommerce_email_customer_address_section
woocommerce/templates/emails/email-addresses.php 57
do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, false );
woocommerce/templates/emails/email-addresses.php 85
do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, false );
woocommerce/templates/emails/plain/email-addresses.php 41
do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, true );
woocommerce/templates/emails/plain/email-addresses.php 64
do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, true );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-emails.php 205
add_action( 'woocommerce_email_customer_address_section', array( $this, 'additional_address_fields' ), 30, 4 );