Class WC_Emails

Transactional Emails Controller

WooCommerce Emails Class which handles the sending on transactional emails and email templates. This class loads in available emails.

Package: WooCommerce\Classes\Emails
Category: Class
Author: WooThemes
Version: 2.0.0
Class: WC_Emails
Located at includes/class-wc-emails.php

Methods summary

public static Main
# instance( )

Main WooCommerce Instance

Main WooCommerce Instance

Ensures only one instance of WooCommerce is loaded or can be loaded.

Returns

Main
WooCommerce instance

Since

2.1

See

WC()
public
# __clone( )

Cloning is forbidden.

Cloning is forbidden.

Since

2.1
public
# __wakeup( )

Unserializing instances of this class is forbidden.

Unserializing instances of this class is forbidden.

Since

2.1
public
# __construct( )

Constructor for the email class hooks in all emails that can be sent.

Constructor for the email class hooks in all emails that can be sent.

public
# init( )

Init email classes

Init email classes

public array
# get_emails( )

Return the email classes - used in admin to load settings.

Return the email classes - used in admin to load settings.

Returns

array
public string
# get_from_name( )

Get from name for email.

Get from name for email.

Returns

string
public string
# get_from_address( )

Get from email address.

Get from email address.

Returns

string
public string
# get_content_type( )

Get the content type for the email.

Get the content type for the email.

Returns

string
public
# email_header( mixed $email_heading )

Get the email header.

Get the email header.

Parameters

$email_heading
mixed
$email_heading heading for the email
public
# email_footer( )

Get the email footer.

Get the email footer.

public string
# wrap_message( mixed $email_heading, mixed $message, mixed $plain_text = false )

Wraps a message in the woocommerce mail template.

Wraps a message in the woocommerce mail template.

Parameters

$email_heading
mixed
$email_heading
$message
mixed
$message
$plain_text

Returns

string
public
# send( mixed $to, mixed $subject, mixed $message, string $headers = "Content-Type: text/html\r\n", string $attachments = "", string $content_type = 'text/html' )

Send the email.

Send the email.

Parameters

$to
mixed
$to
$subject
mixed
$subject
$message
mixed
$message
$headers
string
$headers (default: "Content-Type: text/html\r\n")
$attachments
string
$attachments (default: "")
$content_type
string
$content_type (default: "text/html")
public
# customer_invoice( mixed $order )

Prepare and send the customer invoice email on demand.

Prepare and send the customer invoice email on demand.

Parameters

$order
mixed
$pay_for_order
public
# customer_new_account( integer $customer_id, array $new_customer_data = array(), mixed $password_generated = false )

Customer new account welcome email.

Customer new account welcome email.

Parameters

$customer_id
integer
$customer_id
$new_customer_data
array
$new_customer_data
$password_generated
public
# order_meta( mixed $order, boolean $sent_to_admin = false, boolean $plain_text = false )

Add order meta to email templates.

Add order meta to email templates.

Parameters

$order
mixed
$order
$sent_to_admin
boolean
$sent_to_admin (default: false)
$plain_text
boolean
$plain_text (default: false)
public
# low_stock( mixed $product )

Low stock notification email.

Low stock notification email.

Parameters

$product
mixed
$product
public
# no_stock( mixed $product )

No stock notification email.

No stock notification email.

Parameters

$product
mixed
$product
public
# backorder( mixed $args )

Backorder notification email.

Backorder notification email.

Parameters

$args
mixed
$args

Magic methods summary

Properties summary

public array $emails
#

Array of email notification classes.

Array of email notification classes.

protected static WooCommerce $_instance
#

The single instance of the class

The single instance of the class

Since

2.1
WooCommerce API documentation generated by ApiGen 2.8.0