woocommerce_mail

The WooCommerce woocommerce mail function.

Description

woocommerce_mail( $to, $subject, $message, $headers = 'Content-Type: text/html 
 
', (string) $attachments = '' ); 

Parameters (5)

0. $to
The to.
1. $subject
The subject.
2. $message
The message.
3. $headers — Optional. (string) => 'Content-Type: text/html '
The headers.
4. $attachments — Optional. (string) => ''
The attachments.

Usage

  1. if ( !function_exists( 'woocommerce_mail' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The to. 
  5. $to = null; 
  6.  
  7. // The subject. 
  8. $subject = null; 
  9.  
  10. // The message. 
  11. $message = null; 
  12.  
  13. // The headers. 
  14. $headers = 'Content-Type: text/html 
  15.  
  16. '; 
  17.  
  18. // The attachments. 
  19. $attachments = ''; 
  20.  
  21. // NOTICE! Understand what this does before running. 
  22. $result = woocommerce_mail($to, $subject, $message, $headers, $attachments); 
  23.  

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = "" ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_mail' ); 
  3. wc_mail( $to, $subject, $message, $headers, $attachments );