From 588107b3e06c828dba57d6dbc233ec2054ddca20 Mon Sep 17 00:00:00 2001 From: Justin Stern Date: Mon, 27 May 2013 10:20:01 -0400 Subject: [PATCH] Custom Order Number in Backorder Email Custom order number is used in the backorder email --- classes/class-wc-emails.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/class-wc-emails.php b/classes/class-wc-emails.php index a8d767be8fc..d34003f1ad2 100644 --- a/classes/class-wc-emails.php +++ b/classes/class-wc-emails.php @@ -363,7 +363,8 @@ class WC_Emails { else $title = sprintf(__( 'Product #%s - %s', 'woocommerce' ), $product->id, get_the_title($product->id)) . $sku; - $message = sprintf(__( '%s units of %s have been backordered in order #%s.', 'woocommerce' ), $quantity, $title, $order_id ); + $order = new WC_Order( $order_id ); + $message = sprintf(__( '%s units of %s have been backordered in order %s.', 'woocommerce' ), $quantity, $title, $order->get_order_number() ); // CC, BCC, additional headers $headers = apply_filters('woocommerce_email_headers', '', 'backorder', $args); @@ -375,4 +376,4 @@ class WC_Emails { wp_mail( get_option('woocommerce_stock_email_recipient'), $subject, $message, $headers, $attachments ); } -} \ No newline at end of file +}