Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi there,

    All these email templates can be customized from your theme folder, so you can copy this file to your theme folder (for example: wp-content/themes/your-child-theme/woocommerce/emails/customer-reset-password.php) and change that line of code from there with the wanted string.

    Alternatively, you could also use a plugin like Say What to customize this string from the backend (Tools>Text changes).

    I hope it helps!

    Here you can find more details about how to customize the default email templates: https://woocommerce.com/posts/how-to-customize-emails-in-woocommerce/

    Thread Starter viesiissz

    (@viesiissz)

    @bernattorras

    Thanks you! I have already it.

    My question is about that username change to e-email.

    %user_login i need change to %user_email ?

    Hi there,

    Yes, the $user_email should be available on that template, so you can replace this line of code with:

    <p><?php printf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_email ) ); ?></p>

    If for some reason it isn’t working, you can always get the user email address with the following code:

    $user_info = get_userdata( $user_id );
    $user_email = $user_info->user_email;
    Thread Starter viesiissz

    (@viesiissz)

    @bernattorras
    Thanks for responsive ! ??

    I tried

    echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_email ) ) . "\n\n";

    But something not working.

    In this case, please try to use the following lines instead:

    $user_info = get_userdata( $user_id );
    $user_email = $user_info->user_email;
    echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_email ) ) . "\n\n";

    Let us know if it does the trick!

    Thread Starter viesiissz

    (@viesiissz)

    @bernattorras
    Thank you !
    It’s work ! ??

    Awesome! Thanks for letting us know! ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Lost password email text’ is closed to new replies.