woocommerce_mail_content

The WooCommerce woocommerce mail content hook.

Description

apply_filters( 'woocommerce_mail_content', (unknown) $this_style_inline_message ); 

Parameters (1)

0. $this_style_inline_message (unknown)
The this style inline message.

Usage

To run the hook, copy the example below.
  1. $this_style_inline_message = apply_filters( 'woocommerce_mail_content', $this_style_inline_message ); 
  2.  
  3. if ( !empty( $this_style_inline_message ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_mail_content callback 
  2. function filter_woocommerce_mail_content( $this_style_inline_message ) { 
  3. // make filter magic happen here... 
  4. return $this_style_inline_message
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_mail_content', 'filter_woocommerce_mail_content', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_mail_content', 'filter_woocommerce_mail_content', 10, 1 ); 

Defined (2)

The filter is defined in the following location(s).

/includes/emails/class-wc-email.php  
  1. $message = apply_filters( 'woocommerce_mail_content', $this->style_inline( $message ) ); 
/includes/admin/class-wc-admin.php  
  1. $message = apply_filters( 'woocommerce_mail_content', $email->style_inline( $mailer->wrap_message( $email_heading, $message ) ) );