Use wc_get_template_html

This commit is contained in:
Mike Jolley 2015-12-04 13:39:57 +00:00
parent 0ebba8b0be
commit 6cb11d5cc0
10 changed files with 20 additions and 60 deletions

View File

@ -68,15 +68,13 @@ class WC_Email_Cancelled_Order extends WC_Email {
* @return string
*/
public function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -85,15 +83,13 @@ class WC_Email_Cancelled_Order extends WC_Email {
* @return string
*/
public function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
/**

View File

@ -104,15 +104,13 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
* @return string
*/
function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -121,15 +119,13 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
* @return string
*/
function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
/**

View File

@ -111,15 +111,13 @@ class WC_Email_Customer_Invoice extends WC_Email {
* @return string
*/
function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -129,15 +127,13 @@ class WC_Email_Customer_Invoice extends WC_Email {
* @return string
*/
function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
/**

View File

@ -73,8 +73,7 @@ class WC_Email_Customer_New_Account extends WC_Email {
* @return string
*/
function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'email_heading' => $this->get_heading(),
'user_login' => $this->user_login,
'user_pass' => $this->user_pass,
@ -84,7 +83,6 @@ class WC_Email_Customer_New_Account extends WC_Email {
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -94,8 +92,7 @@ class WC_Email_Customer_New_Account extends WC_Email {
* @return string
*/
function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'email_heading' => $this->get_heading(),
'user_login' => $this->user_login,
'user_pass' => $this->user_pass,
@ -105,7 +102,6 @@ class WC_Email_Customer_New_Account extends WC_Email {
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
}

View File

@ -88,8 +88,7 @@ class WC_Email_Customer_Note extends WC_Email {
* @return string
*/
function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'customer_note' => $this->customer_note,
@ -97,7 +96,6 @@ class WC_Email_Customer_Note extends WC_Email {
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -107,8 +105,7 @@ class WC_Email_Customer_Note extends WC_Email {
* @return string
*/
function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'customer_note' => $this->customer_note,
@ -116,7 +113,6 @@ class WC_Email_Customer_Note extends WC_Email {
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
}

View File

@ -70,15 +70,13 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
* @return string
*/
function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -88,15 +86,13 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
* @return string
*/
function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
}

View File

@ -136,8 +136,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
* @return string
*/
public function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'refund' => $this->refund,
'partial_refund' => $this->partial_refund,
@ -146,7 +145,6 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -155,8 +153,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
* @return string
*/
public function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'refund' => $this->refund,
'partial_refund' => $this->partial_refund,
@ -165,7 +162,6 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
/**

View File

@ -79,8 +79,7 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
* @return string
*/
function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'email_heading' => $this->get_heading(),
'user_login' => $this->user_login,
'reset_key' => $this->reset_key,
@ -89,7 +88,6 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -99,8 +97,7 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
* @return string
*/
function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'email_heading' => $this->get_heading(),
'user_login' => $this->user_login,
'reset_key' => $this->reset_key,
@ -109,7 +106,6 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
}

View File

@ -68,15 +68,13 @@ class WC_Email_Failed_Order extends WC_Email {
* @return string
*/
public function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -85,15 +83,13 @@ class WC_Email_Failed_Order extends WC_Email {
* @return string
*/
public function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
/**

View File

@ -72,15 +72,13 @@ class WC_Email_New_Order extends WC_Email {
* @return string
*/
public function get_content_html() {
ob_start();
wc_get_template( $this->template_html, array(
return wc_get_template_html( $this->template_html, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => false,
'email' => $this
) );
return ob_get_clean();
}
/**
@ -90,15 +88,13 @@ class WC_Email_New_Order extends WC_Email {
* @return string
*/
public function get_content_plain() {
ob_start();
wc_get_template( $this->template_plain, array(
return wc_get_template_html( $this->template_plain, array(
'order' => $this->object,
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => true,
'email' => $this
) );
return ob_get_clean();
}
/**