Created
September 26, 2017 18:29
-
-
Save remyperona/df6ad40e81b24418fe91627660c0d005 to your computer and use it in GitHub Desktop.
Clear cache on logout
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
function wp_rocket_clear_user_cache_logout() { | |
$user = wp_get_current_user(); | |
rocket_clean_user( $user->ID ); | |
} | |
add_action( 'clear_auth_cookie', 'wp_rocket_clear_user_cache_logout' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment