Hi @usbswiper,
Thanks for reaching out.
Are you using any email customizer plugins or any custom codes to alter the WooCommerce email content? Kindly share your WooCommerce system status report (WooCommerce>status>system status report) for a better understanding.
Same here – I’m using the following snippet to change the subject line – the original order number is displayed – is there a way to override this? Thank you.
add_filter('woocommerce_email_subject_new_order', 'change_admin_email_subject', 1, 2);
function change_admin_email_subject( $subject, $order ) {
global $woocommerce;
$subject = sprintf( '%s - %s %s - %s', $order->id, $order->billing_first_name, $order->billing_last_name, date('d-m-Y', strtotime($order->order_date)));
return $subject;
}
Hi @richward1,
Thanks for reaching out.
We have modified the given snippet to fetch the sequential order number instead of the default WC order id. Replace the previously added code with the below-mentioned code and check.
add_filter('woocommerce_email_subject_new_order', 'change_admin_email_subject', 1, 2);
function change_admin_email_subject( $subject, $order ) {
global $woocommerce;
$subject = sprintf( '%s - %s %s - %s', $order->get_order_number(), $order->billing_first_name, $order->billing_last_name, date('d-m-Y', strtotime($order->order_date)));
return $subject;
}
@webtoffee Sorry I never replied. Looks like my ticket got hijacked. 🙂
I am indeed using an email customizer: Email Customizer for WooCommerce v3.6.0 by ThemeHigh.
Do you happen to know how to resolve this when their plugin is involved?
@webtoffee I see that in the Email Customizer settings there is a section for mapping, and inside that it’s setting the subject line using {order_id}.
What’s interesting is that the email body seems to be using that same thing, and it’s outputting the SON number as expected.
Just wanted to provide that additional info.
Hi @usbswiper,
Thanks for sharing the information.
Can you check it by adding the placeholder {order_number} instead of {order_id} in your email customizer?