Have Customer Invoice email accept order id as param too
This commit is contained in:
parent
eb90b0ed10
commit
bfd041a197
|
@ -46,6 +46,10 @@ class WC_Email_Customer_Invoice extends WC_Email {
|
|||
function trigger( $order ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! is_object( $order ) ) {
|
||||
$order = new WC_Order( absint( $order ) );
|
||||
}
|
||||
|
||||
if ( $order ) {
|
||||
$this->object = $order;
|
||||
$this->recipient = $this->object->billing_email;
|
||||
|
|
Loading…
Reference in New Issue