Performance Optimisation exposes WordPress actions and filters for integrations that need a narrow override. The complete current set is generated from the source reference; this page highlights the contracts most often needed by a theme or companion plugin.
Cache lifecycle
| Hook | Purpose |
|---|---|
wppo_before_cache_clear | Action before an all or single-page static-cache clear. |
wppo_after_cache_clear | Action after a successful clear; edge and LiteSpeed adapters may fan out here. |
wppo_should_cache_request | Filter the post-safety-gate cache decision for a request. |
wppo_invalidation_urls | Filter additional paths purged when a post changes. |
wppo_woo_cacheable | Filter a WooCommerce request after canonical exclusion checks. |
wppo_woo_invalidation_urls | Filter surgical product/order/coupon purge paths. |
WooCommerce safe mode, unknown query parameters, and the pre-boot drop-in remain fail-closed. A filter cannot make a known unsafe query or foreign drop-in cacheable.
Assets, CSS, and images
wppo_exclude_minification,wppo_exclude_defer_js, andwppo_exclude_delay_jsfilter asset exclusion lists.wppo_inline_combined_csscan return false when a CDN owns the combined stylesheet.wppo_delay_js_allowed_hostscontrols the bounded host allowlist for deferred external scripts.wppo_used_css_safelistandwppo_css_preview_fetch_timeouttune used-CSS safety and preview behavior.wppo_critical_css_strict_cspandwppo_used_css_strict_cspdeclare a server/edge CSP that PHP cannot detect.
Monitoring and integrations
wppo_database_cleanup_completedfires after aggregate or per-type cleanup.wppo_purge_failed_actionsandwppo_action_scheduler_cleanup_enabledbound Action Scheduler retention.wppo_builder_purge_mapadds a builder-update purge map.wppo_llms_txt_contentfilters generatedllms.txtorllms-full.txtcontent.wppo_esi_allowed_htmlis a server-side sanitization contract for ESI fragments; do not add script-capable tags casually.
Safe integration rules
- Use a narrow callback and preserve the incoming type.
- Do not log credentials, cookies, authorization headers, or full request bodies.
- Keep the hook\’s priority and accepted-argument count compatible with the source contract.
- Test on staging, including editor preview and dynamic WooCommerce routes.
Open the generated code reference for every discovered wppo_* definition and registration. The repository\’s docs/hooks.md remains the long-form developer reference.