wp_logout action not working

I’m trying to remove some cookies set to control persistent login when the user specifically wants to log out of a website. I thought it would be as simple as: function remove_user_cookie() { unset($_COOKIE[‘woai’]); unset($_COOKIE[‘woak’]); } add_action(‘wp_logout’, ‘remove_user_cookie’); I’ve also tried: function remove_user_cookie() { if( $_GET[‘action’] == ‘logout’ ) : unset($_COOKIE[‘woai’]); unset($_COOKIE[‘woak’]); endif; } add_action(‘wp_logout’, … Read more

Best practices for Storyboard login screen, handling clearing of data upon logout

I’m building an iOS app using a Storyboard. The root view controller is a Tab Bar Controller. I’m creating the login/logout process, and it’s mostly working fine, but I’ve got a few issues. I need to know the BEST way to set all this up. I want to accomplish the following: Show a login screen … Read more

wp_logout Not Logging Me Out

Here is what I’m doing: wp_logout(); var_dump(is_user_logged_in()); var_dump returns: bool(true) Why is wp_logout() not logging me out? 2 Answers 2 wp_logout() calls clear_auth_cookie(), which expires all authorization cookies set. It doesn’t change the value of the global $current_user variable. So technically you’re still logged in for the duration of the script. If you’re using wp_logout … Read more