PHP 클래스 WC_Emails

WooCommerce Emails Class which handles the sending on transactional emails and email templates. This class loads in available emails.
저자: WooThemes
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$emails Array of email notification classes

보호된 프로퍼티들

프로퍼티 타입 설명
$_instance The single instance of the class

공개 메소드들

메소드 설명
__clone ( ) Cloning is forbidden.
__construct ( ) Constructor for the email class hooks in all emails that can be sent.
__wakeup ( ) Unserializing instances of this class is forbidden.
backorder ( array $args ) Backorder notification email.
customer_detail_field_is_valid ( array $field ) : boolean Is customer detail field valid?
customer_details ( mixed $order, boolean $sent_to_admin = false, boolean $plain_text = false ) : string Add customer details to email templates.
customer_invoice ( $order ) Prepare and send the customer invoice email on demand.
customer_new_account ( integer $customer_id, array $new_customer_data = [], $password_generated = false ) Customer new account welcome email.
email_addresses ( $order, $sent_to_admin = false, $plain_text = false ) Get the email addresses.
email_footer ( ) Get the email footer.
email_header ( mixed $email_heading ) Get the email header.
get_emails ( ) : array Return the email classes - used in admin to load settings.
get_from_address ( ) : string Get from email address.
get_from_name ( ) : string Get from name for email.
init ( ) Init email classes.
init_transactional_emails ( ) Hook in all transactional emails.
instance ( ) : WC_Emails Main WC_Emails Instance.
low_stock ( WC_Product $product ) Low stock notification email.
no_stock ( WC_Product $product ) No stock notification email.
order_details ( $order, $sent_to_admin = false, $plain_text = false, $email = '' ) Show the order details table
order_meta ( mixed $order, boolean $sent_to_admin = false, boolean $plain_text = false ) : string Add order meta to email templates.
order_schema_markup ( mixed $order, boolean $sent_to_admin = false, boolean $plain_text = false ) Adds Schema.org markup for order in JSON-LD format.
send ( mixed $to, mixed $subject, mixed $message, string $headers = "Content-Type: text/html ", string $attachments = "" ) : boolean Send the email.
send_transactional_email ( ) Init the mailer instance and call the notifications for the current filter.
wrap_message ( mixed $email_heading, string $message, $plain_text = false ) : string Wraps a message in the woocommerce mail template.

비공개 메소드들

메소드 설명
get_blogname ( ) : string Get blog name formatted for emails.

메소드 상세

__clone() 공개 메소드

Cloning is forbidden.
부터: 2.1
public __clone ( )

__construct() 공개 메소드

Constructor for the email class hooks in all emails that can be sent.
public __construct ( )

__wakeup() 공개 메소드

Unserializing instances of this class is forbidden.
부터: 2.1
public __wakeup ( )

backorder() 공개 메소드

Backorder notification email.
public backorder ( array $args )
$args array

customer_detail_field_is_valid() 공개 메소드

Is customer detail field valid?
public customer_detail_field_is_valid ( array $field ) : boolean
$field array
리턴 boolean

customer_details() 공개 메소드

Add customer details to email templates.
public customer_details ( mixed $order, boolean $sent_to_admin = false, boolean $plain_text = false ) : string
$order mixed
$sent_to_admin boolean (default: false)
$plain_text boolean (default: false)
리턴 string

customer_invoice() 공개 메소드

Prepare and send the customer invoice email on demand.
public customer_invoice ( $order )

customer_new_account() 공개 메소드

Customer new account welcome email.
public customer_new_account ( integer $customer_id, array $new_customer_data = [], $password_generated = false )
$customer_id integer
$new_customer_data array

email_addresses() 공개 메소드

Get the email addresses.
public email_addresses ( $order, $sent_to_admin = false, $plain_text = false )

email_header() 공개 메소드

Get the email header.
public email_header ( mixed $email_heading )
$email_heading mixed heading for the email

get_emails() 공개 메소드

Return the email classes - used in admin to load settings.
public get_emails ( ) : array
리턴 array

get_from_address() 공개 메소드

Get from email address.
public get_from_address ( ) : string
리턴 string

get_from_name() 공개 메소드

Get from name for email.
public get_from_name ( ) : string
리턴 string

init() 공개 메소드

Init email classes.
public init ( )

init_transactional_emails() 공개 정적인 메소드

Hook in all transactional emails.
public static init_transactional_emails ( )

instance() 공개 정적인 메소드

Ensures only one instance of WC_Emails is loaded or can be loaded.
부터: 2.1
public static instance ( ) : WC_Emails
리턴 WC_Emails Main instance

low_stock() 공개 메소드

Low stock notification email.
public low_stock ( WC_Product $product )
$product WC_Product

no_stock() 공개 메소드

No stock notification email.
public no_stock ( WC_Product $product )
$product WC_Product

order_details() 공개 메소드

Show the order details table
public order_details ( $order, $sent_to_admin = false, $plain_text = false, $email = '' )

order_meta() 공개 메소드

Add order meta to email templates.
public order_meta ( mixed $order, boolean $sent_to_admin = false, boolean $plain_text = false ) : string
$order mixed
$sent_to_admin boolean (default: false)
$plain_text boolean (default: false)
리턴 string

order_schema_markup() 공개 메소드

Adds Schema.org markup for order in JSON-LD format.
또한 보기: WC_Structured_Data::generate_order_data()
사용 중단: 2.7.0
부터: 2.6.0
public order_schema_markup ( mixed $order, boolean $sent_to_admin = false, boolean $plain_text = false )
$order mixed
$sent_to_admin boolean (default: false)
$plain_text boolean (default: false)

send() 공개 메소드

Send the email.
public send ( mixed $to, mixed $subject, mixed $message, string $headers = "Content-Type: text/html ", string $attachments = "" ) : boolean
$to mixed
$subject mixed
$message mixed
$headers string (default: "Content-Type: text/html\r\n")
$attachments string (default: "")
리턴 boolean

send_transactional_email() 공개 정적인 메소드

Init the mailer instance and call the notifications for the current filter.
public static send_transactional_email ( )

wrap_message() 공개 메소드

Wraps a message in the woocommerce mail template.
public wrap_message ( mixed $email_heading, string $message, $plain_text = false ) : string
$email_heading mixed
$message string
리턴 string

프로퍼티 상세

$_instance 보호되어 있는 정적으로 프로퍼티

The single instance of the class
protected static $_instance

$emails 공개적으로 프로퍼티

Array of email notification classes
public $emails