0

I would like to change the "Customer new account" email.

In this line:

' . esc_html( $user_login ) . '' ); ?>

I would like to change the parameter %2$s, instead of showing the username I would like to show the email address.

What parameter should I use to show the email address?

This is the complete customer-new-account.php :

<p><?php printf( __( 'Thanks for creating an account on %1$s. Your username is %2$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>' ); ?></p>
<p><?php printf( __( 'Your password has been automatically generated: %s', 'woocommerce' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p>
<p><?php printf( __( 'You can access your account area to view your orders and change your password here: %s.', 'woocommerce' ), make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); ?></p>

Thanks for the support!

  • Format your question properly, please. – Max Yudin Sep 19 '18 at 9:24
  • How are people supposed to know that you are talking about WooCommerce? – Michael Sep 19 '18 at 10:46
0

The simplest one is to copy the mail template to your theme folder into path/to/your/theme/woocommerce/emails/customer-new-account.php and adjust the argument from user_login to user_email.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.