abstract class Email extends WC_Email

An abstract class for mandating essential parts of the \WC_Email, and implementing email set-up and sending.

Properties

static protected bool $_constructed

Methods

static string
email_id()

Abstract: mandate email ID field.

static string
email_title()

Abstract: mandate email method title field (appears in WC settings).

static string
email_description()

Abstract: mandate email description field (appears in WC settings)

static string
email_heading()

Abstract: mandate email heading field.

static string
email_subject()

Abstract: mandate email subject field.

static string
email_html_template()

Abstract: mandate email HTML template field.

__construct()

Email contructor. Set mandatory properties.

string
_woocommerce_mail_content(string $content)

The WooCommerce 'woocommerce_mail_content' action hook. Supply the find/replace functionality.

static 
send_email(mixed $object)

A function for aliasing the email action hook set in the constructor.

set_placeholders()

An empty function for optionally setting up the email placeholders.

set_recipient()

A placeholder function for setting the recipient.

trigger(mixed $object)

The WC email 'trigger' function expected.

string
get_content_html()

Get content html using WooCommerce template functions.

Details

at line 33
abstract static string email_id()

Abstract: mandate email ID field.

Return Value

string

The WC email ID.

at line 40
abstract static string email_title()

Abstract: mandate email method title field (appears in WC settings).

Return Value

string

The email method title.

at line 47
abstract static string email_description()

Abstract: mandate email description field (appears in WC settings)

Return Value

string

The email method description.

at line 54
abstract static string email_heading()

Abstract: mandate email heading field.

Return Value

string

The email heading.

at line 61
abstract static string email_subject()

Abstract: mandate email subject field.

Return Value

string

The email subject.

at line 68
abstract static string email_html_template()

Abstract: mandate email HTML template field.

Return Value

string

The email HTML template.

at line 73
__construct()

Email contructor. Set mandatory properties.

at line 100
final string _woocommerce_mail_content(string $content)

The WooCommerce 'woocommerce_mail_content' action hook. Supply the find/replace functionality.

Parameters

string $content

The email text content.

Return Value

string

The body with all of the placeholders replaced.

at line 109
final static send_email(mixed $object)

A function for aliasing the email action hook set in the constructor.

Parameters

mixed $object

The WC email object.

at line 118
set_placeholders()

An empty function for optionally setting up the email placeholders.

at line 123
set_recipient()

A placeholder function for setting the recipient.

at line 130
final trigger(mixed $object)

The WC email 'trigger' function expected.

Parameters

mixed $object

The WC email object.

at line 147
final string get_content_html()

Get content html using WooCommerce template functions.

Return Value

string