WordPress action hook
wpo_cache_flush
Fired by 15 WordPress plugins, running on 2M+ sites between them.
“Fires after purging the cache”
How to use wpo_cache_flush
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'wpo_cache_flush', function() {
// Your code runs here.
}, 10, 1 );Argument names come from WP-Optimize's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
15 plugins that fire wpo_cache_flush
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WP-Optimize1+ million installs
do_action( 'wpo_cache_flush' )cache/class-wpo-page-cache.php:666 -
Duplicator1+ million installs
do_action( 'wpo_cache_flush' )src/Utils/CachesPurge/CachesPurge.php:248 -
Fast Velocity Minify30,000+ installs
do_action( 'wpo_cache_flush' )inc/common.php:247 -
ReviewX6,000+ installs
do_action( 'wpo_cache_flush' )app/Cache/Purger.php:124 -
WP Delicious4,000+ installs
do_action( 'wpo_cache_flush' )src/Functions/HelperFunctions.php:408 -
Persian Admnin Fonts500+ installs
do_action( 'wpo_cache_flush' )admin/class-admin.php:718 -
Hushpage10+ installs
do_action( 'wpo_cache_flush' )includes/class-hushpage-settings.php:402 -
VizProof Timeline10+ installs
do_action( 'wpo_cache_flush' )includes/class-vizproof-timeline-runs-service.php:2898 -
WAAVE Compliance WP10+ installs
do_action( 'wpo_cache_flush' )includes/class-waave-compliance-cache.php:237 -
SlopStopper: AI Generative Content ObscurerFewer than 10 installs
do_action( 'wpo_cache_flush' )slopstopper.php:964 -
MNPR Client PortalFewer than 10 installs
do_action( 'wpo_cache_flush' )includes/frontend/class-mnprcp-site-tools.php:75 -
Baseline Labs ConnectorFewer than 10 installs
do_action( 'wpo_cache_flush' )includes/class-bl-cache-plugins.php:203 -
Tepee for HelloAssoFewer than 10 installs
do_action( 'wpo_cache_flush' )includes/class-tfha-cache.php:66 -
MSACAlab Accessibility CheckerFewer than 10 installs
do_action( 'wpo_cache_flush' )includes/class-corea11y-compat.php:219 -
Siternet Website MigrationFewer than 10 installs
do_action( 'wpo_cache_flush' )includes/class-url-guard.php:196
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.