You can use below code to redirect on custom page OR cart page.
if ( (isset($_GET[‘action’]) && $_GET[‘action’] != ‘logout’) || (isset($_POST[‘login_location’]) && !empty($_POST[‘login_location’])) ) {
add_filter(‘login_redirect’, ‘my_login_redirect’, 10, 3);
function my_login_redirect() {
$location = $_SERVER[‘HTTP_REFERER’];
wp_safe_redirect($location);
exit();
}
}
WordPress by default does not send any mail after login. There must be some third party plugin which will trigger the emails. You provably need to find the hook to disable that.
Hope this helps!
Thanks!
]]>Let me know if you need further assistance.
Thanks!
]]>