PHP 클래스 WC_Email

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

공개 프로퍼티들

프로퍼티 타입 설명
$description string Description for the email.
$enabled 'yes' if the method is enabled.
$find array Strings to find in subjects/headings.
$heading string Heading for the email content.
$id String Email method ID.
$mime_boundary string Mime boundary (for multipart emails).
$mime_boundary_header string Mime boundary header (for multipart emails).
$object object | boolean Object this email is for, for example a customer, product, or email.
$plain_replace array @var array $plain_replace
$plain_search array https://raw.github.com/ushahidi/wp-silcc/master/class.html2text.inc
$recipient string Recipients for the email.
$replace array Strings to replace in subjects/headings.
$sending boolean True when email is being sent.
$subject string Subject for the email.
$template_base string Template path.
$template_html string HTML template path.
$template_plain string Plain text template path.
$title string Email method title.

보호된 프로퍼티들

프로퍼티 타입 설명
$customer_email boolean True when the email notification is sent to customers.
$manual boolean True when the email notification is sent manually only.

공개 메소드들

메소드 설명
__construct ( ) Constructor.
admin_options ( ) Admin Options.
format_string ( mixed $string ) : string Format email string.
get_attachments ( ) : string Get email attachments.
get_blogname ( ) : string Get WordPress blog name.
get_content ( ) : string Get email content.
get_content_html ( ) : string Get the email content in HTML format.
get_content_plain ( ) : string Get the email content in plain text format.
get_content_type ( ) : string Get email content type.
get_description ( ) : string Return the email's description
get_email_type ( ) : string get_type function.
get_email_type_options ( ) : array Email type options.
get_from_address ( ) : string Get the from address for outgoing emails.
get_from_name ( ) : string Get the from name for outgoing emails.
get_headers ( ) : string Get email headers.
get_heading ( ) : string Get email heading.
get_option ( string $key, mixed $empty_value = null ) : string Proxy to parent's get_option and attempt to localize the result using gettext.
get_recipient ( ) : string Get valid recipients.
get_subject ( ) : string Get email subject.
get_template ( string $type ) : string Get template.
get_theme_template_file ( string $template ) : string Get the template file in the current theme.
get_title ( ) : string Return the email's title
handle_multipart ( PHPMailer $mailer ) : PHPMailer Handle multipart mail.
init_form_fields ( ) Initialise Settings Form Fields - these are generic email options most will use.
is_customer_email ( ) : boolean Checks if this email is customer focussed.
is_enabled ( ) : boolean Checks if this email is enabled and will be sent.
is_manual ( ) : boolean Checks if this email is manually sent
process_admin_options ( ) Admin Panel Options Processing.
send ( string $to, string $subject, string $message, string $headers, string $attachments ) : boolean Send an email.
style_inline ( string | null $content ) : string Apply inline styles to dynamic content.

보호된 메소드들

메소드 설명
admin_actions ( ) Admin actions.
delete_template_action ( string $template_type ) Delete template action.
move_template_action ( string $template_type ) Move template action.
save_template ( string $template_code, string $template_path ) Save the email templates.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

admin_actions() 보호된 메소드

Admin actions.
protected admin_actions ( )

admin_options() 공개 메소드

Setup the email settings screen. Override this in your email.
부터: 1.0.0
public admin_options ( )

delete_template_action() 보호된 메소드

Delete template action.
protected delete_template_action ( string $template_type )
$template_type string

format_string() 공개 메소드

Format email string.
public format_string ( mixed $string ) : string
$string mixed
리턴 string

get_attachments() 공개 메소드

Get email attachments.
public get_attachments ( ) : string
리턴 string

get_blogname() 공개 메소드

Get WordPress blog name.
public get_blogname ( ) : string
리턴 string

get_content() 공개 메소드

Get email content.
public get_content ( ) : string
리턴 string

get_content_html() 공개 메소드

Get the email content in HTML format.
public get_content_html ( ) : string
리턴 string

get_content_plain() 공개 메소드

Get the email content in plain text format.
public get_content_plain ( ) : string
리턴 string

get_content_type() 공개 메소드

Get email content type.
public get_content_type ( ) : string
리턴 string

get_description() 공개 메소드

Return the email's description
public get_description ( ) : string
리턴 string

get_email_type() 공개 메소드

get_type function.
public get_email_type ( ) : string
리턴 string

get_email_type_options() 공개 메소드

Email type options.
public get_email_type_options ( ) : array
리턴 array

get_from_address() 공개 메소드

Get the from address for outgoing emails.
public get_from_address ( ) : string
리턴 string

get_from_name() 공개 메소드

Get the from name for outgoing emails.
public get_from_name ( ) : string
리턴 string

get_headers() 공개 메소드

Get email headers.
public get_headers ( ) : string
리턴 string

get_heading() 공개 메소드

Get email heading.
public get_heading ( ) : string
리턴 string

get_option() 공개 메소드

Proxy to parent's get_option and attempt to localize the result using gettext.
public get_option ( string $key, mixed $empty_value = null ) : string
$key string
$empty_value mixed
리턴 string

get_recipient() 공개 메소드

Get valid recipients.
public get_recipient ( ) : string
리턴 string

get_subject() 공개 메소드

Get email subject.
public get_subject ( ) : string
리턴 string

get_template() 공개 메소드

Get template.
public get_template ( string $type ) : string
$type string
리턴 string

get_theme_template_file() 공개 메소드

Get the template file in the current theme.
public get_theme_template_file ( string $template ) : string
$template string
리턴 string

get_title() 공개 메소드

Return the email's title
public get_title ( ) : string
리턴 string

handle_multipart() 공개 메소드

Handle multipart mail.
public handle_multipart ( PHPMailer $mailer ) : PHPMailer
$mailer PHPMailer
리턴 PHPMailer

init_form_fields() 공개 메소드

Initialise Settings Form Fields - these are generic email options most will use.
public init_form_fields ( )

is_customer_email() 공개 메소드

Checks if this email is customer focussed.
public is_customer_email ( ) : boolean
리턴 boolean

is_enabled() 공개 메소드

Checks if this email is enabled and will be sent.
public is_enabled ( ) : boolean
리턴 boolean

is_manual() 공개 메소드

Checks if this email is manually sent
public is_manual ( ) : boolean
리턴 boolean

move_template_action() 보호된 메소드

Move template action.
protected move_template_action ( string $template_type )
$template_type string

process_admin_options() 공개 메소드

Admin Panel Options Processing.

save_template() 보호된 메소드

Save the email templates.
부터: 2.4.0
protected save_template ( string $template_code, string $template_path )
$template_code string
$template_path string

send() 공개 메소드

Send an email.
public send ( string $to, string $subject, string $message, string $headers, string $attachments ) : boolean
$to string
$subject string
$message string
$headers string
$attachments string
리턴 boolean success

style_inline() 공개 메소드

Apply inline styles to dynamic content.
public style_inline ( string | null $content ) : string
$content string | null
리턴 string

프로퍼티 상세

$customer_email 보호되어 있는 프로퍼티

True when the email notification is sent to customers.
protected bool $customer_email
리턴 boolean

$description 공개적으로 프로퍼티

Description for the email.
public string $description
리턴 string

$enabled 공개적으로 프로퍼티

'yes' if the method is enabled.
public $enabled

$find 공개적으로 프로퍼티

Strings to find in subjects/headings.
public array $find
리턴 array

$heading 공개적으로 프로퍼티

Heading for the email content.
public string $heading
리턴 string

$id 공개적으로 프로퍼티

Email method ID.
public String $id
리턴 String

$manual 보호되어 있는 프로퍼티

True when the email notification is sent manually only.
protected bool $manual
리턴 boolean

$mime_boundary 공개적으로 프로퍼티

Mime boundary (for multipart emails).
public string $mime_boundary
리턴 string

$mime_boundary_header 공개적으로 프로퍼티

Mime boundary header (for multipart emails).
public string $mime_boundary_header
리턴 string

$object 공개적으로 프로퍼티

Object this email is for, for example a customer, product, or email.
public object|bool $object
리턴 object | boolean

$plain_replace 공개적으로 프로퍼티

@var array $plain_replace
public array $plain_replace
리턴 array

$recipient 공개적으로 프로퍼티

Recipients for the email.
public string $recipient
리턴 string

$replace 공개적으로 프로퍼티

Strings to replace in subjects/headings.
public array $replace
리턴 array

$sending 공개적으로 프로퍼티

True when email is being sent.
public bool $sending
리턴 boolean

$subject 공개적으로 프로퍼티

Subject for the email.
public string $subject
리턴 string

$template_base 공개적으로 프로퍼티

Template path.
public string $template_base
리턴 string

$template_html 공개적으로 프로퍼티

HTML template path.
public string $template_html
리턴 string

$template_plain 공개적으로 프로퍼티

Plain text template path.
public string $template_plain
리턴 string

$title 공개적으로 프로퍼티

Email method title.
public string $title
리턴 string