我的购物网站是由WordPress和WooCommerce创建的。当用户在网站上注册时,会向用户发送两封电子邮件,一封来自WooCommerce,另一封来自WordPress。如何阻止WordPress发送电子邮件?我只需要woo commerce发送注册成功的电子邮件。
将其添加到主题的'functions.php'中,这将禁用用户和管理员通知。
if ( ! function_exists( 'wp_new_user_notification' ) ) :
function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
return;
}
endif;