I would like to remove the order number from all customer emails. We have multiple systems connected to our Woocommerce site and another service is generating order ID’s that the customer will use for order tracking.
I’ve managed to remove all the others, just left with the one that appears in the email next to the date. Can anyone guide me on how to do this?
You can remove the order number from customer emails by editing the email templates. The template to copy and override is woocommerce/templates/emails/email-order-details.php
Please note that writing or providing custom code is not within the scope of our support policy. If you are still having problems, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:
Hi @shameemreza, thanks for the links. I managed to sort it out.
I overrode & edited the template, basically displaying only what I want in the email template. Here’s an example of the template. Maybe it can help someone in need:
<?php // Check if the order object is available if ( ! defined( 'ABSPATH' ) ) { exit; }
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p> <p><?php printf( esc_html__( 'We have received your order and it is now being processed. One of our consultants will be in touch with you shortly.', 'woocommerce' ) ); ?></p>