简体   繁体   中英

User Registration Email - Wordpress

I have a user dashboard where customers can login and view invoices etc.

When I put their invoice details it, WordPress automatically creates an account and generates a password and sends a welcome email.

The problem is that the email is very basic and I want to give it my own wording.

I have seen ways of editing different WordPress default emails but cannot find a way of editing this particular one, even with plugins.

the email reads:

Your Access Credentials [http://www.website.co.uk]

Dear customer,

we have set an account for you on http://s692312552.websitehome.co.uk. You are able to login now using the following credentials:

URL: http://www.website.co.uk/login/
Login: webmaster@email.co.uk
Password: X5USOGgLhjBo

I am looking for a way to edit the email content so I can have my own content added.

I have searched online and also installed the plugin '
Better Notifications for WordPress' but cannot find anything related to this particular email

Ideally, I would like to use a template like:

<p>Dear customer,</p>

<p>we have set an account for you on <span style="font-weight: bold;"><a href="https://www.website.co.uk">website</a></span>.</p>

<p>You can use this account to update your information.</p>
<div style="width: 90%; margin-left: 5%; background-color: #edf2f7; text-align: center; padding: 15px 0;">

<p>Your Login Credentials are:</p>

<p><span style="font-weight: bold;">Login:</span> [email_user_email]</p>

<p><span style="font-weight: bold;">Password:</span> [password]</p>

</div>
<p>To access your account and update your password you can login <a href="https://www.website.co.uk/my-account">here</a></p>

<p>Kind Regards</p>

<p>website Accounts</p>

Any help would be great

Replace the code between lines 649 and 656

      global $wpi_settings;
      if ( is_int( $user_id ) && WPI_Functions::is_true( $wpi_settings['send_password_to_new_users'] ) ) {

        $subject = 'Your Access Credentials ' . get_bloginfo('url');
        $body = '<p>Dear Customer,</p>';
        $body .= '<p>we have set an account for you on <span style="font-weight: bold;"><a href="'.get_bloginfo('url').'">'.ud_get_wp_invoice()->domain.'</a></span>.</p>';
        $body .= '<p>You can use this account to update your information.</p>';
        $body .= '<div style="width: 90%; margin-left: 5%; background-color: #edf2f7; text-align: center; padding: 15px 0;"> ';
        $body .= '<p>Your Login Credentials are:</p>';
        $body .= '<p><span style="font-weight: bold;">Login: </span>'.$userdata[ 'user_login' ].'</p>';
        $body .= '<p><span style="font-weight: bold;">Password: </span>'.$userdata[ 'user_pass' ].'</p>';
        $body .= '</div>';
        $body .= '<p>To access your account and update your password you can login <a href="'.get_bloginfo('url').'/my-account">here</a></p>';
        $body .= '<p>Kind Regards,</p><p>website Accounts</p>';

        //added a blind carbon copy to the headers so you can easily debug
        $headers[]= "Bcc: [YOU] <your@email.com>";

        wp_mail($userdata[ 'user_email' ],$subject,$body,$headers);
      }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM