用户注册电子邮件-WordPress

时间:2019-02-08 21:38:45

标签: php html wordpress

我有一个用户仪表板,客户可以在其中登录和查看发票等。

当我输入发票详细信息时,WordPress会自动创建一个帐户并生成一个密码并发送一封欢迎电子邮件。

问题在于该电子邮件非常基本,我想用自己的措辞来表达。

我已经看到了编辑不同的WordPress默认电子邮件的方法,但是即使使用插件也找不到编辑此特定电子邮件的方法。

电子邮件显示为:

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

我正在寻找一种编辑电子邮件内容的方法,以便可以添加自己的内容。

我已经在线搜索并安装了插件'
WordPress的“更好的通知”,但找不到与此特定电子邮件相关的任何内容

理想情况下,我想使用类似以下模板:

<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>

任何帮助都会很棒

1 个答案:

答案 0 :(得分:0)

在649行和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);
      }
相关问题