skip to Main Content

for some reason the emails being sent to customers after they create a WooCommerce account displays a random name (see attached).

WooCommerce username error

I think because users can create an account with just an email address? But anyway – I want to just remove the Hi xxxx from all email communication from the customer. How do I do this? I am looking at the email templates but can’t see how this code is generated?

2

Answers


  1. Chosen as BEST ANSWER

    Thanks - yes that solved the issue. The problem occurred because of a plugin conflict with a translation plugin. Thanks for the response to the question.


  2. To remove the name from email communication, you need to copy the email template file in your theme directory (e.g – customer-processing-order.php) on this find the below code:

    <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
    

    And replace with the below mentioned code:

    <p><?php printf( esc_html__( 'Hi,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
    

    Same thing you can do for following Woocommerce email template files:

    customer-completed-order.php
    customer-completed-order.php
    customer-invoice.php
    customer-note.php
    customer-on-hold-order.php
    customer-processing-order.php
    customer-refunded-order.php
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search