Created
May 3, 2021 18:09
-
-
Save pschoenmakers/5af6886f62bedcf8d31dc1915fe08dac to your computer and use it in GitHub Desktop.
W3 Total Cache clear cache on logout hook
This file contains 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
<?php | |
function clear_cache_on_logout() { | |
if (function_exists('w3tc_flush_all')) { | |
w3tc_flush_all(); | |
} | |
} | |
add_action( 'wp_logout', 'clear_cache_on_logout' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment