Have Customer Invoice email accept order id as param too

This commit is contained in:
Coen Jacobs 2012-10-12 15:37:33 +02:00
parent eb90b0ed10
commit bfd041a197
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,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;