• Resolved johanna75

    (@johanna75)


    Hi Support!

    I need to change the text in the mail for New account.
    I do not need translation i will replace it with few lines in French.

    My question is: can i erase the following lines and put in the <p> my text?
    I’m not php language friendly so will it bug or it’s ok? Thk!

    <p><?php printf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes. Just try it. Keep a copy of the original. If the site whites-out, put the original back.

    The issue is to avoid your changed template being overwritten at the next update. To do so, put your custom template at:
    wp-content/themes/my-child-theme-name/woocommerce/emails/customer-new-account.php

    WooCommerce will find and use your custom template in preference to the default one.

    Thread Starter johanna75

    (@johanna75)

    Thank you will test!

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @johanna75

    Yes, you can replace the existing line of code with your own text. However, as you’ve mentioned that you’re unfamiliar with PHP, I suggest you replace the English text within the PHP function by following the guide shared by @lorro and avoid erasing the entire line. This is to ensure that you don’t accidentally remove any important PHP functions that could cause a bug in your system.

    Follow our detailed guide to dive deeper into editing and overriding WooCommerce templates: https://woocommerce.com/document/template-structure/

    If you have any further questions on development or custom coding, don’t hesitate to reach out to some of our great resources available for support. Our WooCommerce community is brimming with skilled open-source developers who are active on the following channels:

    Feel free to ask if you face any issues or need further assistance. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customer new account email’ is closed to new replies.