WC_Emails::wrap_message
Wraps a message in the woocommerce mail template.
Method of the class: WC_Emails{}
Hooks from the method
Returns
String.
Usage
$WC_Emails = new WC_Emails(); $WC_Emails->wrap_message( $email_heading, $message, $deprecated );
- $email_heading(string) (required)
- Heading text.
- $message(string) (required)
- Email message.
- $deprecated(true|false)
- Deprecated.
Default:false
WC_Emails::wrap_message() WC Emails::wrap message code WC 10.5.0
public function wrap_message( $email_heading, $message, $deprecated = false ) {
if ( $deprecated ) {
wc_deprecated_argument( 'WC_Emails::wrap_message', '9.9.0' );
}
ob_start();
/**
* Action hook for email header.
*
* @since 3.0.0
* @param string $email_heading Heading text.
* @param null $null Unused.
*/
do_action( 'woocommerce_email_header', $email_heading, null );
echo wp_kses_post( wpautop( wptexturize( $message ) ) );
/**
* Action hook for email footer.
*
* @since 3.0.0
* @param null $null Unused.
*/
do_action( 'woocommerce_email_footer', null );
return ob_get_clean();
}