• Resolved chilidogs

    (@chilidogs)


    Hi Mike!

    Would it be possible to send or generate ‘a reset password link’ automatically to a user that has registered directly in the checkout pagein the welcome mail?

    Thanks in advance for your time!
    Best regards!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, it is possible .

    You need to overwrite this template
    /woocommerce/templates/emails/customer-new-account.php

    and add reset link with these lines:

    <?php
    $user_data = get_user_by( 'login', $user_login );
    $key = get_password_reset_key( $user_data );
    ?>
    
    <p>
    <a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $key, 'login' => rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>">
    <?php _e( 'Click here to reset your password', 'woocommerce' ); ?></a>
    </p>
    Thread Starter chilidogs

    (@chilidogs)

    Thanks a lot Raf!
    It worked like a charm!

    Thanks a lot for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reset Password link to be send in the Welcome registration e-mail’ is closed to new replies.