Change Text and Link In Welcome Email
-
Hello. I just installed your plugin and it’s working great. However I would like to change where the confirmation text and link appears in the welcome email. I found a smilier post and followed the directions, but it doesn’t seem to work.
In the advanced area I’ve checked “Choose precisely where the activation email will be appended to the “Customer new account” email” and tried adding the recommended code to a copy of the templates/emails/customer-new-account.php in my child theme:
do_action( “alg_wc_ev_activation_email_content_placeholder”, $email->object );
Unless I place it at the very top, it either doesn’t show or it causes a fatal error. I spent a few hours on it so I’m sure my syntax is wrong somewhere.
I know the file in my child theme is working as I can change the other text and see it displayed in the welcome email, but I just can’t sort out exactly how to add your code snippet so that it appears where I want it.
I would simply like the “Please click on the following link” and the link itself to appear directly after the salutation “Hi username”
Below is the original php code. Would you be so kind as to update it with the exact code to accomplish this?
Thanks very much!
defined( 'ABSPATH' ) || exit; do_action( 'woocommerce_email_header', $email_heading, $email ); ?> <?php /* translators: %s: Customer username */ ?> <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p> <?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?> <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> <?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated ) : ?> <?php /* translators: %s: Auto generated password */ ?> <p><?php printf( esc_html__( 'Your password has been automatically generated: %s', 'woocommerce' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p> <?php endif; ?> <?php /** * Show user-defined additional content - this is set in each email's settings. */ if ( $additional_content ) { echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); } do_action( 'woocommerce_email_footer', $email );
- The topic ‘Change Text and Link In Welcome Email’ is closed to new replies.