WC_Emails::wrap_message( string $email_heading, string $message, bool $plain_text = false )
Wraps a message in the woocommerce mail template.
Description Description
Parameters Parameters
- $email_heading
-
(Required) Heading text.
- $message
-
(Required) Email message.
- $plain_text
-
(Optional) Set true to send as plain text. Default to false.
Default value: false
Return Return
(string)
Source Source
File: includes/class-wc-emails.php
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; }