woocommerce_email_heading_(id)
Provides an opportunity to inspect and modify heading for the email.
Usage
add_filter( 'woocommerce_email_heading_(id)', 'wp_kama_woocommerce_email_heading_id_filter', 10, 3 );
/**
* Function for `woocommerce_email_heading_(id)` filter-hook.
*
* @param string $heading Heading to be added to the email.
* @param object|bool $object The object (ie, product or order) this email relates to, if any.
* @param WC_Email $email WC_Email instance managing the email.
*
* @return string
*/
function wp_kama_woocommerce_email_heading_id_filter( $heading, $object, $email ){
// filter...
return $heading;
}
- $heading(string)
- Heading to be added to the email.
- $object(object|true|false)
- The object (ie, product or order) this email relates to, if any.
- $email(WC_Email)
- WC_Email instance managing the email.
Changelog
| Since 2.0.0 | Introduced. |
Where the hook is called
woocommerce_email_heading_(id)
woocommerce/includes/emails/class-wc-email.php 606
return apply_filters( 'woocommerce_email_heading_' . $this->id, $this->format_string( $this->get_option_or_transient( 'heading', $this->get_default_heading() ) ), $this->object, $this );