我正在为用户禁用Wordpress中的标准“您已重置密码”电子邮件。
是否可以对此进行扩展?我很确定以下内容会禁用电子邮件:
/**
* Disable User Notification of Password Change Confirmation
*/
add_filter( 'send_password_change_email', '__return_false' );
当发生火灾时,我可以将它与其他东西结合吗?
基本上,我想使用其他邮寄服务通过以下方式发送电子邮件:
$this->sendinblue_send_template($customer_email, 6);
因此,当密码更改电子邮件触发时,如何合并两者并使用我的代码段?
我建议您构建一个plugin,这是构建所需插件的代码而且您可以像这样使用filter:
// define the send_password_change_email callback
function filter_send_password_change_email( $send, $user, $userdata ) {
$send = false;
// write the code if you want to send to other email provider
return $send;
};
// add the filter
add_filter( 'send_password_change_email', 'filter_send_password_change_email', 10, 3 );