WordPress at Your Fingertips
function is not described

WC_Email::send() public WC 1.0

Send an email.

{} It's a method of the class: WC_Email{}

Return

true|false. success

Usage

$WC_Email = new WC_Email();
$WC_Email->send( $to, $subject, $message, $headers, $attachments );
$to(string) (required)
Email to.
$subject(string) (required)
Email subject.
$message(string) (required)
Email message.
$headers(string) (required)
Email headers.
$attachments(array) (required)
Email attachments.

Code of WC_Email::send() WC 5.9.0

public function send( $to, $subject, $message, $headers, $attachments ) {
	add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
	add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
	add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );

	$message              = apply_filters( 'woocommerce_mail_content', $this->style_inline( $message ) );
	$mail_callback        = apply_filters( 'woocommerce_mail_callback', 'wp_mail', $this );
	$mail_callback_params = apply_filters( 'woocommerce_mail_callback_params', array( $to, $subject, $message, $headers, $attachments ), $this );
	$return               = $mail_callback( ...$mail_callback_params );

	remove_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
	remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
	remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );

	/**
	 * Action hook fired when an email is sent.
	 *
	 * @since 5.6.0
	 * @param bool     $return Whether the email was sent successfully.
	 * @param int      $id     Email ID.
	 * @param WC_Email $this   WC_Email instance.
	 */
	do_action( 'woocommerce_email_sent', $return, $this->id, $this );

	return $return;
}