parent
5349171083
commit
b58e26b0ab
|
@ -43,13 +43,17 @@ class WC_Email_Cancelled_Order extends WC_Email {
|
|||
}
|
||||
|
||||
/**
|
||||
* Trigger.
|
||||
* Trigger the sending of this email.
|
||||
*
|
||||
* @param int $order_id
|
||||
* @param WC_Order $order
|
||||
* @param int $order_id The order ID.
|
||||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order ) {
|
||||
if ( $order ) {
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
if ( is_a( $order, 'WC_Order' ) ) {
|
||||
$this->object = $order;
|
||||
$this->find['order-date'] = '{order_date}';
|
||||
$this->find['order-number'] = '{order_number}';
|
||||
|
|
|
@ -47,13 +47,17 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
|
|||
}
|
||||
|
||||
/**
|
||||
* Trigger.
|
||||
* Trigger the sending of this email.
|
||||
*
|
||||
* @param int $order_id
|
||||
* @param WC_Order $order
|
||||
* @param int $order_id The order ID.
|
||||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order ) {
|
||||
if ( $order ) {
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
if ( is_a( $order, 'WC_Order' ) ) {
|
||||
$this->object = $order;
|
||||
$this->recipient = $this->object->get_billing_email();
|
||||
|
||||
|
|
|
@ -61,12 +61,17 @@ class WC_Email_Customer_Invoice extends WC_Email {
|
|||
}
|
||||
|
||||
/**
|
||||
* Trigger.
|
||||
* Trigger the sending of this email.
|
||||
*
|
||||
* @param int|WC_Order $order
|
||||
* @param int $order_id The order ID.
|
||||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order ) {
|
||||
if ( $order ) {
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
if ( is_a( $order, 'WC_Order' ) ) {
|
||||
$this->object = $order;
|
||||
$this->recipient = $this->object->get_billing_email();
|
||||
|
||||
|
|
|
@ -41,13 +41,17 @@ class WC_Email_Customer_On_Hold_Order extends WC_Email {
|
|||
}
|
||||
|
||||
/**
|
||||
* Trigger.
|
||||
* Trigger the sending of this email.
|
||||
*
|
||||
* @param int $order_id
|
||||
* @param WC_Order $order
|
||||
* @param int $order_id The order ID.
|
||||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order ) {
|
||||
if ( $order ) {
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
if ( is_a( $order, 'WC_Order' ) ) {
|
||||
$this->object = $order;
|
||||
$this->recipient = $this->object->get_billing_email();
|
||||
|
||||
|
|
|
@ -41,13 +41,17 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
|
|||
}
|
||||
|
||||
/**
|
||||
* Trigger.
|
||||
* Trigger the sending of this email.
|
||||
*
|
||||
* @param int $order_id
|
||||
* @param WC_Order $order
|
||||
* @param int $order_id The order ID.
|
||||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order ) {
|
||||
if ( $order ) {
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
if ( is_a( $order, 'WC_Order' ) ) {
|
||||
$this->object = $order;
|
||||
$this->recipient = $this->object->get_billing_email();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
if ( ! class_exists( 'WC_Email_Failed_Order' ) ) :
|
||||
|
||||
/**
|
||||
* Failed Order Email
|
||||
* Failed Order Email.
|
||||
*
|
||||
* An email sent to the admin when payment fails to go through.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@ if ( ! class_exists( 'WC_Email_Failed_Order' ) ) :
|
|||
class WC_Email_Failed_Order extends WC_Email {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->id = 'failed_order';
|
||||
|
@ -43,13 +43,17 @@ class WC_Email_Failed_Order extends WC_Email {
|
|||
}
|
||||
|
||||
/**
|
||||
* Trigger.
|
||||
* Trigger the sending of this email.
|
||||
*
|
||||
* @param int $order_id
|
||||
* @param WC_Order $order
|
||||
* @param int $order_id The order ID.
|
||||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order ) {
|
||||
if ( $order ) {
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
if ( is_a( $order, 'WC_Order' ) ) {
|
||||
$this->object = $order;
|
||||
$this->find['order-date'] = '{order_date}';
|
||||
$this->find['order-number'] = '{order_number}';
|
||||
|
|
|
@ -47,13 +47,17 @@ class WC_Email_New_Order extends WC_Email {
|
|||
}
|
||||
|
||||
/**
|
||||
* Trigger.
|
||||
* Trigger the sending of this email.
|
||||
*
|
||||
* @param int $order_id
|
||||
* @param WC_Order $order
|
||||
* @param int $order_id The order ID.
|
||||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order ) {
|
||||
if ( $order ) {
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
if ( is_a( $order, 'WC_Order' ) ) {
|
||||
$this->object = $order;
|
||||
$this->find['order-date'] = '{order_date}';
|
||||
$this->find['order-number'] = '{order_number}';
|
||||
|
|
Loading…
Reference in New Issue