Skip to content

Instantly share code, notes, and snippets.

@Patrick64
Last active January 30, 2020 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Patrick64/601ac7c10081db0e435d9216c4848108 to your computer and use it in GitHub Desktop.
Save Patrick64/601ac7c10081db0e435d9216c4848108 to your computer and use it in GitHub Desktop.
wpsitesync-clear-w3-cache-after-push.php
add_action('spectrom_sync_api_process','clear_cache_after_sitesync_push',10,3);
function clear_cache_after_sitesync_push($action, $response, $apicontroller) {
if ($action==='push_complete' || $action==='push') {
if (function_exists('w3tc_flush_all')) {
w3tc_flush_all();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment