/* Sends User Back To Previous Page After WC Login */
add_filter( 'woocommerce_login_redirect', 'lf_woocommerce_refresh_after_login', 9999, 2 );
function lf_woocommerce_refresh_after_login( $redirect, $user ) {
$redirect = home_url($_SERVER['REQUEST_URI']); // current page refresh
return $redirect;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.