wc_mail()
Send HTML emails from WooCommerce.
No Hooks.
Returns
true|false.
Usage
wc_mail( $to, $subject, $message, $headers, $attachments );
- $to(mixed) (required)
- Receiver.
- $subject(mixed) (required)
- Subject.
- $message(mixed) (required)
- Message.
- $headers(string)
- Headers. .
Default:"Content-Type: text/html\r\n" - $attachments(string)
- Attachments. .
Default:""
wc_mail() wc mail code WC 10.7.0
function wc_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = '' ) {
$mailer = WC()->mailer();
return $mailer->send( $to, $subject, $message, $headers, $attachments );
}