How to get session token of current user in wp_login hook?
You can’t access the $_COOKIE in this hook. You can only access $_COOKIE after the page HTTP headers are set with the $_COOKIE its mean in the next page. You have other hook that you can hook into to get the cookies in the function wp_set_auth_cookie() there is this action at the end. do_action( ‘set_logged_in_cookie’, … Read more