absint(get_option('avp_cookie_duration', 30)), 'redirectUrl' => esc_url(get_option('avp_redirect_url', 'https://google.com')), 'minAge' => $min_age, 'errorSelectDate' => __('Please select your date of birth.', 'advanced-age-verification-popup'), 'errorUnderage' => sprintf(__('You must be %d or older to enter.', 'advanced-age-verification-popup'), $min_age) ); wp_localize_script('avp-script', 'avpData', apply_filters('avp_frontend_data', $frontend_data)); $bg_color = sanitize_hex_color(get_option('avp_color_popup_bg', '#1a1b20')); $primary_color = sanitize_hex_color(get_option('avp_color_primary', '#10b981')); $text_color = sanitize_hex_color(get_option('avp_color_text', '#ffffff')); $muted_color = sanitize_hex_color(get_option('avp_color_text_muted', '#9ca3af')); $custom_css = " :root { --avp-bg-popup: {$bg_color}; --avp-primary: {$primary_color}; --avp-text-main: {$text_color}; --avp-text-muted: {$muted_color}; } #avp-overlay { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; padding: 15px !important; box-sizing: border-box !important; z-index: 2147483647 !important; background-color: rgba(15, 23, 42, 0.95) !important; pointer-events: auto !important; isolation: isolate !important; } #avp-popup, #avp-popup * { pointer-events: auto !important; } #avp-popup { max-height: 85vh !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; border-radius: 12px !important; width: 100% !important; margin: auto !important; } #avp-popup::-webkit-scrollbar { width: 5px; } #avp-popup::-webkit-scrollbar-track { background: transparent; } #avp-popup::-webkit-scrollbar-thumb { background: var(--avp-primary); border-radius: 10px; } .avp-popup-inner { box-sizing: border-box !important; max-width: 100% !important; width: 100% !important; padding-bottom: 15px !important; } .avp-dob-wrapper, .avp-input-group, .avp-btn-block { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; } .avp-input-group .avp-input, #avp-dob { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; -webkit-appearance: none !important; appearance: none !important; font-size: 16px !important; margin: 0 !important; } /* Fixes the calendar opening behind the overlay */ .flatpickr-calendar { z-index: 2147483647 !important; } "; wp_add_inline_style('avp-style', $custom_css); } add_action('admin_enqueue_scripts', 'avp_admin_scripts'); function avp_admin_scripts($hook) { if ($hook != 'toplevel_page_age-verification') { return; } wp_enqueue_media(); wp_enqueue_style('wp-color-picker'); wp_enqueue_script('wp-color-picker'); // NEW: Enqueue custom AJAX scripts and styles wp_enqueue_style('avp-admin-ajax', plugin_dir_url(__FILE__) . 'assets/css/admin-ajax.css', array(), AVP_FREE_VERSION); wp_enqueue_script('avp-admin-ajax', plugin_dir_url(__FILE__) . 'assets/js/admin-ajax.js', array('jquery'), AVP_FREE_VERSION, true); // Pass AJAX URL and Nonce to JavaScript wp_localize_script('avp-admin-ajax', 'avpAjaxData', array( 'ajaxurl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('avp_save_settings_nonce') )); } // Add Popup HTML add_action('wp_footer', 'avp_add_popup'); function avp_add_popup() { if ( get_option('avp_bypass_logged_in', '1') && is_user_logged_in() ) return; if ( get_option('avp_bypass_crawlers', '1') && avp_is_crawler() ) return; $logo = esc_url(get_option('avp_logo', '')); $title = esc_html(get_option('avp_title', __('Please verify your age', 'advanced-age-verification-popup'))); $subtitle = esc_html(get_option('avp_subtitle', __('You must be of legal age to enter this site.', 'advanced-age-verification-popup'))); $warning = esc_html(get_option('avp_warning_text', __('WARNING: This website contains age-restricted content.', 'advanced-age-verification-popup'))); $enter_text = esc_html(get_option('avp_enter_text', __('I am 18 or older', 'advanced-age-verification-popup'))); $exit_text = esc_html(get_option('avp_exit_text', __('I am under 18', 'advanced-age-verification-popup'))); $method = sanitize_text_field(get_option('avp_verification_method', 'yesno')); $show_remember = get_option('avp_show_remember_me', '1'); ?>

' . __('Get Pro 🚀', 'advanced-age-verification-popup') . '', 'manage_options', 'avp-pro-landing', 'avp_pro_landing_page_html' ); } } // 1. Update Action Links add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'avp_plugin_action_links' ); function avp_plugin_action_links( $links ) { $settings_url = admin_url( 'admin.php?page=age-verification' ); $settings_link = '' . esc_html__( 'Settings', 'advanced-age-verification-popup' ) . ''; array_unshift( $links, $settings_link ); if ( ! function_exists( 'avp_pro_init' ) ) { // UPDATED: URL and target="_blank" $upgrade_link = '' . esc_html__( 'Upgrade to Pro 🚀', 'advanced-age-verification-popup' ) . ''; array_unshift( $links, $upgrade_link ); } return $links; } // 2. Update Row Meta add_filter( 'plugin_row_meta', 'avp_plugin_row_meta', 10, 2 ); function avp_plugin_row_meta( $links, $file ) { if ( plugin_basename( __FILE__ ) === $file ) { // UPDATED: URL $site_link = '' . esc_html__( 'Visit plugin site', 'advanced-age-verification-popup' ) . ''; $docs_link = '' . esc_html__( 'Documentation', 'advanced-age-verification-popup' ) . ''; $links[] = $site_link; $links[] = $docs_link; } return $links; } // Modern Full-Width SaaS Settings Page function avp_settings_page() { $logo = get_option('avp_logo', ''); $title = get_option('avp_title', __('Please verify your age', 'advanced-age-verification-popup')); $subtitle = get_option('avp_subtitle', __('You must be of legal age to enter this site.', 'advanced-age-verification-popup')); $warning = get_option('avp_warning_text', __('WARNING: This website contains age-restricted content.', 'advanced-age-verification-popup')); $enter_text = get_option('avp_enter_text', __('I am 18 or older', 'advanced-age-verification-popup')); $exit_text = get_option('avp_exit_text', __('I am under 18', 'advanced-age-verification-popup')); $redirect_url = get_option('avp_redirect_url', 'https://google.com'); $cookie_duration = get_option('avp_cookie_duration', 30); $method = get_option('avp_verification_method', 'yesno'); // NEW: Prevent redirect lockout if a user deactivates Pro while a Pro feature is saved if ( ! function_exists( 'avp_pro_init' ) && $method === 'face_id' ) { $method = 'yesno'; } $min_age = get_option('avp_min_age', 18); $bypass_logged_in = get_option('avp_bypass_logged_in', '1'); $bypass_crawlers = get_option('avp_bypass_crawlers', '1'); $show_remember_me = get_option('avp_show_remember_me', '1'); // Style settings $bg_color = get_option('avp_color_popup_bg', '#1a1b20'); $primary_color = get_option('avp_color_primary', '#10b981'); $text_color = get_option('avp_color_text', '#ffffff'); $muted_color = get_option('avp_color_text_muted', '#9ca3af'); ?>

Advanced Age Verification Free v

Configure compliance settings, verification rules, and visual aesthetics.

Verification Engine & Gate Rules

Define how users verify their age and where to send underage visitors.

Default age threshold (e.g., 18 or 21) required to gain access.

Modal Content & Media

Customize text labels, warnings, and display logos.

Logo Preview

Color Palette

Customize popup color schemes to seamlessly blend with your brand aesthetic.

Session & Caching Rules

Manage consent cookies, logged-in user exceptions, and crawler bypasses.

How long the verification cookie persists before requiring re-verification.

More from Yeasin

Powerful plugins to secure, optimize, and grow your WordPress website.

Yeasin Geo-Blocker Pro

Security & Access

Take ultimate control of your website's traffic and security. Block or redirect users by location, dynamically show/hide content, and secure your WooCommerce checkout. From stopping VPN/Tor bots and API attacks to generating secure bypass links, get complete geo-protection with 100% MaxMind accuracy.

Unlock Everything Premium ⭐

Upgrade to Pro 🚀

Get maximum legal protection, fraud prevention, and seamless WooCommerce conversion tools.

  • ✓
    Geo-Location & Country Rules
    Targeted Display, Country Rules, Strict Geo-Fencing.
  • ✓
    WooCommerce Integrations
    Display Scope, Soft Gating, B2B Bypass, Shipping Lock.
  • ✓
    Design & Themes
    Pre-made aesthetics, Visual Themes, Entrance Animations.
  • ✓
    Security & Lockout
    Strict Anti-Bypass, Brute Force Protection, Bot CAPTCHA.
  • ✓
    Identity Moderation (KYC)
    Document Uploads, Moderation Queue, AI Verification.
  • ✓
    Analytics Dashboard
    Drop-off rates, Device Breakdown, Marketing Pixels (GA4/Meta).
Get Pro Today →

Need Support?

Having trouble setting up your age gate? Our support team is here to help.

Get Free Support

Leave a Review

Enjoying the plugin? Please leave a review on WordPress.org to help us reach more store owners.

Rate Us on WordPress.org ⭐

Upgrade Your Compliance Engine

Ensure total legal protection with AI-powered Identity Verification, strict Geo-Location targeting, and frictionless WooCommerce conversion tools.

Get Pro Today

Geo-Location & Country Rules

  • ✓
    Targeted Display Only show the age gate to visitors from specific countries.
  • ✓
    Dynamic Country Rules Automatically require different minimum ages based on the user's region (e.g., US:21, UK:18).
  • ✓
    Strict Geo-Fencing Instantly block or redirect users attempting to access from illegal states or restricted countries.

WooCommerce Integrations

  • ✓
    Display Scope Lock the entire site, protect specific product categories, or restrict only the checkout form.
  • ✓
    Conversion Soft Gating Let customers browse freely; only show the age gate when they click "Add to Cart".
  • ✓
    B2B & Shipping Locks Auto-bypass verified wholesalers and automatically tag WooCommerce orders for Adult Signature delivery.

Design & Themes

  • ✓
    Pre-made Aesthetics Apply 1-click premium templates designed for Vape, Wine, and CBD industries.
  • ✓
    Visual Controls Customize Google Fonts, border radius, frosted glass blur intensity, and entrance animations.
  • ✓
    Media Backgrounds Add highly immersive full-screen background images or silent, looping MP4 videos.

Security & Lockout

  • ✓
    Strict Anti-Bypass Stop teenagers from hitting "Back" to fake their age. Cache-proof IP bans physically block underage users.
  • ✓
    Fraud Protection Actively block Inspect Element tools and enforce a maximum realistic age limit (e.g., block 100+ year olds).
  • ✓
    Bot CAPTCHA Automatically secure the gate against spam bots using silent Cloudflare Turnstile or reCAPTCHA v3.

Identity Moderation (KYC)

  • ✓
    Document Uploads Enforce strict compliance by requiring users to securely upload a Photo ID alongside their Date of Birth.
  • ✓
    Moderation Queue Review, approve, or instantly auto-shred submissions from a beautifully organized backend Lightbox.
  • ✓
    AI Auto-Verification Connect Stripe Identity or Veriff API keys to instantly scan faces and auto-approve documents.

Analytics Dashboard

  • ✓
    Traffic & Trends Visualize your views, passes, and drop-off rates on interactive Chart.js graphs across custom date ranges.
  • ✓
    Deep Diagnostics View performance breakdowns by Device (Mobile vs. Desktop) and pinpoint geographic drop-offs.
  • ✓
    Marketing Pixels Automatically push age_gate_passed conversion events directly to Google Analytics 4 and Meta Pixel.
id !== 'toplevel_page_age-verification' ) { return; } $user_id = get_current_user_id(); if ( get_user_meta( $user_id, 'avp_pro_notice_dismissed', true ) ) return; $snooze_time = get_user_meta( $user_id, 'avp_pro_notice_dismissed_until', true ); if ( $snooze_time && time() < $snooze_time ) return; $landing_url = esc_url( admin_url( 'admin.php?page=avp-pro-landing' ) ); $nonce = wp_create_nonce( 'avp_dismiss_notice' ); ?>

Secure your site completely with Age Verification Pro.

Unlock strict Geo-Location targeting, Manual KYC ID Document Reviews, and product-specific WooCommerce age gates.

Upgrade to Pro Remind me later