Class WC_Email

Abstract Email Class

WooCommerce Email Class which is extended by specific email template classes to add emails to WooCommerce

WC_Settings_API
Extended by WC_Email

Direct known subclasses

WC_Email_Customer_Completed_Order, WC_Email_Customer_Invoice, WC_Email_Customer_New_Account, WC_Email_Customer_Note, WC_Email_Customer_Processing_Order, WC_Email_Customer_Reset_Password, WC_Email_New_Order

Abstract
Package: WooCommerce\Abstracts
Category: Abstract Class
Author: WooThemes
Version: 2.0.0
Class: WC_Email
Extends: WC_Settings_API
Located at includes/abstracts/abstract-wc-email.php

Methods summary

public
# __construct( )

Constructor

Constructor

public PHPMailer
# handle_multipart( PHPMailer $mailer )

handle_multipart function.

handle_multipart function.

Parameters

$mailer
PHPMailer
$mailer

Returns

PHPMailer
public string
# format_string( mixed $string )

format_string function.

format_string function.

Parameters

$string
mixed
$string

Returns

string
public string
# get_subject( )

get_subject function.

get_subject function.

Returns

string
public string
# get_heading( )

get_heading function.

get_heading function.

Returns

string
public string
# get_recipient( )

get_recipient function.

get_recipient function.

Returns

string
public string
# get_headers( )

get_headers function.

get_headers function.

Returns

string
public array
# get_attachments( )

get_attachments function.

get_attachments function.

Returns

array
public string
# get_email_type( )

get_type function.

get_type function.

Returns

string
public string
# get_content_type( )

get_content_type function.

get_content_type function.

Returns

string
public string
# get_option( string $key, mixed $empty_value = null )

Proxy to parent's get_option and attempt to localize the result using gettext.

Proxy to parent's get_option and attempt to localize the result using gettext.

Parameters

$key
string
$key
$empty_value
mixed
$empty_value

Returns

string

Overrides

WC_Settings_API::get_option
public boolean
# is_enabled( )

Checks if this email is enabled and will be sent.

Checks if this email is enabled and will be sent.

Returns

boolean
public string
# get_blogname( )

get_blogname function.

get_blogname function.

Returns

string
public string
# get_content( )

get_content function.

get_content function.

Returns

string
public array
# style_inline_tags( array $tags )

style_inline_tags function.

style_inline_tags function.

Parameters

$tags
array
$tags

Returns

array
public array
# style_inline_h1_tag( array $styles )

style_inline_h1_tag function.

style_inline_h1_tag function.

Parameters

$styles
array
$styles

Returns

array
public array
# style_inline_h2_tag( array $styles )

style_inline_h2_tag function.

style_inline_h2_tag function.

Parameters

$styles
array
$styles

Returns

array
public array
# style_inline_h3_tag( array $styles )

style_inline_h3_tag function.

style_inline_h3_tag function.

Parameters

$styles
array
$styles

Returns

array
public array
# style_inline_a_tag( array $styles )

Parameters

$styles
array
$styles

Returns

array
public array
# style_inline_img_tag( array $styles )

style_inline_img_tag function.

style_inline_img_tag function.

Parameters

$styles
array
$styles

Returns

array
public array
# get_style_inline_tags( )

get_style_inline_tags function.

get_style_inline_tags function.

Returns

array
public string
# get_style_inline_for_tag( string $tag )

get_style_inline_for_tag function.

get_style_inline_for_tag function.

Parameters

$tag
string
$tag

Returns

string
public string
# style_inline( mixed $content )

Apply inline styles to dynamic content.

Apply inline styles to dynamic content.

Parameters

$content
mixed
$content

Returns

string
public string
# get_content_plain( )

get_content_plain function.

get_content_plain function.

Returns

string
public string
# get_content_html( )

get_content_html function.

get_content_html function.

Returns

string
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 boolean
# send( mixed $to, mixed $subject, mixed $message, string $headers, string $attachments )

Send the email.

Send the email.

Parameters

$to
mixed
$to
$subject
mixed
$subject
$message
mixed
$message
$headers
string
$headers
$attachments
string
$attachments

Returns

boolean
public
# init_form_fields( )

Initialise Settings Form Fields - these are generic email options most will use.

Initialise Settings Form Fields - these are generic email options most will use.

Overrides

WC_Settings_API::init_form_fields
public boolean
# process_admin_options( )

Admin Panel Options Processing

  • Saves the options to the DB

Admin Panel Options Processing

  • Saves the options to the DB

Returns

boolean

Since

1.0.0

Overrides

WC_Settings_API::process_admin_options
public
# admin_options( )

Admin Options

Admin Options

Setup the gateway settings screen. Override this in your gateway.

Since

1.0.0

Overrides

WC_Settings_API::admin_options

Methods inherited from WC_Settings_API

display_errors(), format_settings(), generate_checkbox_html(), generate_decimal_html(), generate_multiselect_html(), generate_password_html(), generate_price_html(), generate_select_html(), generate_settings_html(), generate_text_html(), generate_textarea_html(), generate_title_html(), get_custom_attribute_html(), get_description_html(), get_form_fields(), get_tooltip_html(), init_settings(), validate_checkbox_field(), validate_decimal_field(), validate_multiselect_field(), validate_password_field(), validate_price_field(), validate_select_field(), validate_settings_fields(), validate_text_field(), validate_textarea_field()

Magic methods summary

Properties summary

public string $id
#

Payment method ID.

Payment method ID.

public string $title
#

Payment method title.

Payment method title.

public string $enabled
#

'yes' if the method is enabled.

'yes' if the method is enabled.

public string $description
#

Description for the gateway.

Description for the gateway.

public string $template_plain
#

plain text template path

plain text template path

public string $template_html
#

html template path

html template path

public string $template_base
#

template path

template path

public string $recipient
#

recipients for the email

recipients for the email

public string $heading
#

heading for the email content

heading for the email content

public string $subject
#

subject for the email

subject for the email

public object $object
#

this email is for, for example a customer, product, or email

this email is for, for example a customer, product, or email

public array $find
#

strings to find in subjects/headings

strings to find in subjects/headings

public array $replace
#

strings to replace in subjects/headings

strings to replace in subjects/headings

public string $mime_boundary
#

For multipart emails

For multipart emails

public string $mime_boundary_header
#

For multipart emails

For multipart emails

public boolean $sending
#

true when email is being sent

true when email is being sent

public array $plain_search
#

List of preg* regular expression patterns to search for,
used in conjunction with $replace.
https://raw.github.com/ushahidi/wp-silcc/master/class.html2text.inc

List of preg* regular expression patterns to search for, used in conjunction with $replace. https://raw.github.com/ushahidi/wp-silcc/master/class.html2text.inc

See

mixed
public array $plain_replace
#

List of pattern replacements corresponding to patterns searched.

List of pattern replacements corresponding to patterns searched.

See

$search

Properties inherited from WC_Settings_API

$errors, $form_fields, $plugin_id, $sanitized_fields, $settings

WooCommerce API documentation generated by ApiGen 2.8.0