WC_Emails::wrap_message()publicWC 1.0

Wraps a message in the woocommerce mail template.

Method of the class: WC_Emails{}

Return

String.

Usage

$WC_Emails = new WC_Emails();
$WC_Emails->wrap_message( $email_heading, $message, $plain_text );
$email_heading(string) (required)
Heading text.
$message(string) (required)
Email message.
$plain_text(true|false)
Set true to send as plain text.
Default: false

WC_Emails::wrap_message() code WC 9.4.2

public function wrap_message( $email_heading, $message, $plain_text = false ) {
	// Buffer.
	ob_start();

	do_action( 'woocommerce_email_header', $email_heading, null );

	echo wpautop( wptexturize( $message ) ); // WPCS: XSS ok.

	do_action( 'woocommerce_email_footer', null );

	// Get contents.
	$message = ob_get_clean();

	return $message;
}