Created
August 5, 2019 09:31
-
-
Save zorem/1743d8e9cd8ec5cbe0e1eb31390aac9e to your computer and use it in GitHub Desktop.
Just use below snippet by using this snippet you can maintaining login status after successful login. You just need to add this snippet code in a function.php file if you want to maintain login status.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( "wcalr_after_login", 'wcalr_after_login_func', 10, 1 ); | |
function wcalr_after_login_func($user_signon){ | |
wp_set_current_user($user_signon->ID); | |
wp_set_auth_cookie($user_signon->ID); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment