WordPress action hook

wpfc_clear_post_cache_by_id

Fired by 22 WordPress plugins, running on 1.2M+ sites between them.

How to use wpfc_clear_post_cache_by_id

It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'wpfc_clear_post_cache_by_id', function( $arg1, $post_id ) {
	// Your code runs here.
}, 10, 2 );

Argument names come from WP Fastest Cache's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

22 plugins that fire wpfc_clear_post_cache_by_id

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WP Fastest Cache icon WP Fastest Cache1+ million installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) wpFastestCache.php:2847
  2. Site Reviews icon Site Reviews60,000+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $postId ) plugin/Integrations/Cache/Controller.php:279
  3. WP ULike icon WP ULike60,000+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/classes/class-wp-ulike-purge-cache.php:268
  4. PPWP icon PPWP30,000+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) core/class-ppw-functions.php:701
  5. ThinkRank SEO icon ThinkRank SEO20,000+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/seo/class-cache-purger.php:469
  6. Legal Pages icon Legal Pages8,000+ installs do_action( 'wpfc_clear_post_cache_by_id', false, (int) $id ) app/Models/Settings.php:275
  7. Enable Abilities for MCP icon Enable Abilities for MCP6,000+ installs do_action( 'wpfc_clear_post_cache_by_id', $post_id ) includes/abilities.php:5412
  8. Agent Abilities for MCP icon Agent Abilities for MCP1,000+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/review-origin.php:178
  9. IATO MCP icon IATO MCP200+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $id ) includes/class-cache.php:564
  10. Bit Connect icon Bit Connect100+ installs do_action( 'wpfc_clear_post_cache_by_id', false, (int) $portal->ID ) backend/app/Services/PageCache.php:335
  11. PetPress icon PetPress70+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $id ) pp-CachePurge.php:46
  12. Zorem AI Agent Connector icon Zorem AI Agent Connector50+ installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/Abilities/Site/RefreshCache.php:163
  13. AI Page & Blog Generator for Local SEO icon AI Page & Blog Generator for Local SEOFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) modules/agent/class-live.php:139
  14. Revys icon RevysFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/class-revys-cache.php:193
  15. Agentic SEO for Visibility icon Agentic SEO for VisibilityFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $id ) includes/class-visibility-cache.php:80
  16. Ohara icon OharaFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/Cache/Purge.php:117
  17. ShopToAI Connector icon ShopToAI ConnectorFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', 0, $pid ) shoptoai-connector.php:1422
  18. a11yfy icon a11yfyFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', $post_id ) includes/class-a11yfy-cache.php:114
  19. GripMCP icon GripMCPFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/Support/Page_Cache.php:88
  20. AuthorLabel icon AuthorLabelFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $id ) includes/Compat/Cache.php:136
  21. klevAI Conector icon klevAI ConectorFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/88-cache.php:156
  22. RapidWombat Integration icon RapidWombat IntegrationFewer than 10 installs do_action( 'wpfc_clear_post_cache_by_id', false, $post_id ) includes/cache.php:84

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.