Advanced Tools: Caching, Import / Export & Developer Hooks
Performance, cookie and caching options, backup tools and hooks for developers. Open Age Verification → Advanced & Tools.
Performance
Smart asset loading loads the gate's CSS and JavaScript only on restricted WooCommerce pages (available when the display scope is not “Entire website”). The front end is lightweight — no heavy calendar library is loaded.
Caching & cookies
| Setting | Use |
|---|---|
| Secure & SameSite cookie flags | Recommended on HTTPS sites (GDPR / CCPA). |
| Custom cookie name | Default age_verified. Change it if your cache plugin needs a specific prefix to vary the cache. |
| Cookie path | Default /. Limit the verification to a sub-directory if needed. |
Tip: The gate is cache-friendly: it checks the cookie in the browser, so WP Rocket, LiteSpeed Cache and Cloudflare can keep caching your pages. Features that depend on the visitor (region rules, geo-location, schedule, A/B test, strict gating) automatically mark those pages as not cacheable.
Import, export & reset
- Download export (JSON) — back up your configuration or move it from staging to live.
- Import settings — paste the JSON and import (this overwrites current settings).
- Factory reset — erases all settings, logs, lockouts and stored locations.
Hooks & filters
// Change front-end values (min age, texts…) before they reach the popup
add_filter( 'avp_frontend_data', function ( $data ) {
$data['minAge'] = 25;
return $data;
} );
// Run your own code on any plugin event (same events as the webhooks)
add_action( 'avp_event', function ( $event, $data ) {
if ( $event === 'identity.approved' ) {
// e.g. tag the customer in your CRM
}
}, 10, 2 );
// Tell the plugin the visitor's real IP (custom proxy setups)
add_filter( 'avp_pro_client_ip', fn ( $ip ) => $_SERVER['HTTP_X_REAL_IP'] ?? $ip );
// Turn off the reverse-DNS check for search crawlers
add_filter( 'avp_pro_verify_crawlers', '__return_false' );
Manual trigger & shortcode
Add the class avp-trigger-manual to any button to open the gate, and wrap content in [age_restricted]…[/age_restricted] to hide it until the visitor is verified (details). For external systems see the REST API and webhooks.
Read next
Was this guide helpful?