hCaptcha for WP icon
Security

hCaptcha for WP hooks reference

  • By hcaptcha
  • v5.5.0
  • Updated

hCaptcha for WP 5.5.0 has 12 actions and 54 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when hCaptcha for WP fires an action
add_action( 'hcap_auto_verify_register', function( $output ) {
	// Your code runs here.
}, 10, 1 );

// Change a value hCaptcha for WP is about to use
add_filter( 'hcap_print_hcaptcha_scripts', function( $form_shown ) {
	// Change $form_shown here.
	return $form_shown;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • src/php/Helpers/FormSubmitTime.php line 105 · used in 5 places
    /**
     * Filters whether to print hCaptcha scripts.
     */
    apply_filters( 'hcap_print_hcaptcha_scripts', hcaptcha()->form_shown );
  • src/php/BBPress/LostPassword.php line 74 · used in 4 places
    /**
     * This action is documented in src/php/Sendinblue/Sendinblue.php
     */
    do_action( 'hcap_auto_verify_register', $output );
  • src/php/Helpers/HCaptcha.php line 210 · used in 4 places
    /**
     * Filters the protection status of a form.
     */
    apply_filters( 'hcap_protect_form', true, $args['id']['source'], $args['id']['form_id'] );
  • src/php/Admin/MaxMindDb.php line 182 · used in 3 places
    /**
     * Filters MaxMind country DB path.
     */
    apply_filters( 'hcap_maxmind_db_path', '' );
  • src/php/Divi/Login.php line 100 · used in 3 places
    /**
     * Display hCaptcha signature.
     */
    do_action( 'hcap_signature', $this->get_active_divi_component() . '-login' );
  • src/php/Migrations/Migrations.php line 263 · used in 2 places
    /**
     * Statistics switch is turned on, send plugin statistics.
     */
    do_action( 'hcap_send_plugin_stats' );
  • src/php/Helpers/API.php line 824 · used in 2 places
    /**
     * Filters the result of the Form Submit Time token verification.
     */
    apply_filters( 'hcap_verify_fst_token', $fst_obj->verify_token( $min_submit_time ) );
  • src/php/Main.php line 948 · used in 2 places
    /**
     * Filters the verification host.
     */
    apply_filters( 'hcap_verify_host', $verify_host );
  • src/php/WP/Login.php line 36 · used in 2 places
    /**
     * Filters whether native WordPress login verification can be skipped.
     */
    apply_filters( 'hcap_wp_login_can_skip_verification', $can_skip );
  • hcap_activate

    filter
    src/php/Main.php line 385
    /**
     * Filters the hCaptcha activation flag.
     */
    apply_filters( 'hcap_activate', $activate );
  • src/php/Main.php line 466
    /**
     * Filters whether to add Content Security Policy (CSP) headers.
     */
    apply_filters( 'hcap_add_csp_headers', false, $headers );
  • src/php/Admin/PluginStats.php line 84
    /**
     * Override the Statistics setting and forced-send decision.
     */
    apply_filters( 'hcap_allow_send_plugin_stats', $allow );
  • hcap_api_host

    filter
    src/php/Main.php line 865
    /**
     * Filters the API host.
     */
    apply_filters( 'hcap_api_host', $api_host );
  • hcap_api_src

    filter
    src/php/Main.php line 931
    /**
     * Filters the API source url with params.
     */
    apply_filters( 'hcap_api_src', add_query_arg( $params, $this->get_api_url() ) );
  • src/php/AutoVerify/AutoVerify.php line 354
    /**
     * Filter entry data for the server-registered automatic form.
     */
    apply_filters( 'hcap_auto_verify_entry', $entry );
  • src/php/AutoVerify/AutoVerify.php line 1197
    /**
     * Filters an unmatched request for an action that has auto-verified forms.
     */
    apply_filters( 'hcap_auto_verify_unmatched_form', [], $path, $widget_id );
  • src/php/Helpers/API.php line 490
    /**
     * Filters the user IP to check whether it is denylisted. For denylisted IPs,
     * any form submission fails.
     */
    apply_filters( 'hcap_blacklist_ip', false, hcap_get_user_ip( false ) );
  • src/php/CF7/CF7.php line 289
    /**
     * Filter whether a form has a field of a given type.
     */
    apply_filters( 'hcap_cf7_has_field', $has_field, $submission, $type );
  • src/php/Helpers/API.php line 784
    /**
     * Filters the result of the honeypot field check.
     */
    apply_filters( 'hcap_check_honeypot_field', $check );
  • src/php/Admin/CommandPalette.php line 140
    /**
     * Filters hCaptcha command palette commands.
     */
    apply_filters( 'hcap_command_palette_commands', $commands );
  • src/php/Main.php line 531
    /**
     * Filters the Content Security Policy (CSP) headers.
     */
    apply_filters( 'hcap_csp_headers', $hcap_csp_headers );
  • src/php/Main.php line 1040
    /**
     * Filters delay time for the hCaptcha API script.
     */
    apply_filters( 'hcap_delay_api', (int) ( $settings->get( 'delay' ) ) );
  • src/php/Main.php line 1082
    /**
     * Filters event-based loading of the hCaptcha API script.
     */
    apply_filters( 'hcap_delay_api_event', '' );
  • src/php/DelayedScript/DelayedScript.php line 161
    /**
     * Filters delay API selector.
     */
    apply_filters( 'hcap_delay_api_selector', '' );
  • src/php/AntiSpam/DisposableEmail.php line 124
    /**
     * Filters the disposable email domains blocklist.
     */
    apply_filters( 'hcap_disposable_email_domains', $domains );
  • src/php/includes/request.php line 155
    /**
     * Filters hCaptcha error messages.
     */
    apply_filters( 'hcap_error_messages', [ 'missing-input-secret' => __( 'Your secret key is missing.', 'hcaptcha-for-forms-and-more' ), 'invalid-input-secret' => __( 'Your secret key is invalid or malformed.', 'hcaptcha-for-forms-and-more' ), 'missing-input-response' => __( 'The response parameter (verification token) is missing.', 'hcaptcha-for-forms-and-more' ), 'invalid-input-response' => __( 'The response parameter (verification ... );
  • src/php/Admin/Events/Events.php line 767
    /**
     * Filters the event cleanup batch size for tests and constrained hosts.
     */
    apply_filters( 'hcap_events_cleanup_batch_size', self::CLEANUP_BATCH_SIZE );
  • src/php/Admin/Events/Events.php line 787
    /**
     * Filters the event row limit for deterministic tests and smaller sites.
     */
    apply_filters( 'hcap_events_max_rows', self::MAX_ROWS );
  • src/php/Helpers/HCaptcha.php line 144
    /**
     * Filters the hCaptcha form arguments.
     */
    apply_filters( 'hcap_form_args', $args );
  • src/php/Settings/Abstracts/SettingsBase.php line 503
    /**
     * Filter the form fields.
     */
    apply_filters( 'hcap_form_fields', $this->form_fields, $this );
  • src/php/Helpers/FormSubmitTime.php line 257
    /**
     * Filters the generated token for the Form Submit Time.
     */
    apply_filters( 'hcap_fst_token', $token );
  • src/php/Helpers/FormSubmitTime.php line 203
    /**
     * Filters the time-to-live (TTL) for the Form Submit Time token.
     */
    apply_filters( 'hcap_fst_token_ttl', self::DEFAULT_TOKEN_TTL );
  • src/php/includes/functions.php line 79
    /**
     * Filters the content of the hCaptcha form.
     */
    apply_filters( 'hcap_hcaptcha_content', HCaptcha::form( $atts ), $atts );
  • src/php/AntiSpam/DisposableEmail.php line 93
    /**
     * Filters the disposable email status.
     */
    apply_filters( 'hcap_is_disposable_email', $this->is_disposable_email( $email ), $email );
  • hcap_language

    filter
    src/php/Settings/Settings.php line 475
    /**
     * Filters hCaptcha language.
     */
    apply_filters( 'hcap_language', $this->get( 'language' ) );
  • src/php/Abstracts/LoginBase.php line 485
    /**
     * Filters the login limit exceeded status.
     */
    apply_filters( 'hcap_login_limit_exceeded', $count >= $login_limit );
  • src/php/MigrationWizard/Scanner.php line 100
    /**
     * Filters the list of migration wizard detectors.
     */
    apply_filters( 'hcap_migration_wizard_detectors', $default_detectors );
  • hcap_mode

    filter
    src/php/Settings/Settings.php line 490
    /**
     * Filters the current operating mode to get a relevant key pair.
     */
    apply_filters( 'hcap_mode', $this->get( 'mode' ) );
  • src/php/Helpers/HCaptcha.php line 436
    /**
     * Filters whether to print the invisible hCaptcha disclosure.
     */
    apply_filters( 'hcap_print_invisible_disclosure', false, $args, $widget_params );
  • src/php/Helpers/HCaptcha.php line 153
    /**
     * Register hCaptcha form.
     */
    do_action( 'hcap_register_form', $args );
  • src/php/Settings/Settings.php line 440
    /**
     * Filters the current secret key.
     */
    apply_filters( 'hcap_secret_key', $this->get_keys()['secret_key'] );
  • src/php/Main.php line 216
    /**
     * Filters the settings system initialization arguments.
     */
    apply_filters( 'hcap_settings_init_args', [] );
  • src/php/Admin/Notifications.php line 455
    /**
     * Filter whether to shuffle notifications.
     */
    apply_filters( 'hcap_shuffle_notifications', true );
  • hcap_site_key

    filter
    src/php/Settings/Settings.php line 425
    /**
     * Filters the current site key.
     */
    apply_filters( 'hcap_site_key', $this->get_keys()['site_key'] );
  • hcap_theme

    filter
    src/php/Settings/Settings.php line 460
    /**
     * Filters the current theme to get a relevant key pair.
     */
    apply_filters( 'hcap_theme', $theme );
  • src/php/includes/request.php line 71
    /**
     * Filters the list of address headers to trust.
     */
    apply_filters( 'hcap_trusted_address_headers', $address_headers, $remote_addr, $standard_address_headers );
  • src/php/Main.php line 374
    /**
     * Filters the user IP to check whether it is allowlisted.
     */
    apply_filters( 'hcap_whitelist_ip', false, hcap_get_user_ip( false ) );
  • src/php/Helpers/HCaptcha.php line 337
    /**
     * Filters documented hCaptcha render parameters for an individual widget.
     */
    apply_filters( 'hcap_widget_params', $params, $args );
  • src/php/Abstracts/LoginBase.php line 260
    /**
     * Filters whether the signed native login form is protected.
     */
    apply_filters( 'hcap_wp_login_protection_enabled', $enabled );
  • src/php/Settings/Integrations.php line 1923
    /**
     * Filter the list of plugin to activate.
     */
    apply_filters( 'hcaptcha_activate_plugins', $plugins, $first_only );
  • src/php/Settings/Integrations.php line 2091
    /**
     * Fires after a plugin has been activated.
     */
    do_action( 'hcaptcha_activated_plugin', $plugin, $network_wide );
  • src/php/Settings/Abstracts/SettingsBase.php line 968
    /**
     * Filters fields and their print methods to allow custom fields.
     */
    apply_filters( 'kagg_settings_fields', $this->fields );
  • src/php/Settings/Abstracts/SettingsBase.php line 1828
    /**
     * Fires before the settings tab closing tag.
     */
    do_action( 'kagg_settings_header' );
  • src/php/Settings/Abstracts/SettingsBase.php line 796
    /**
     * Fires before the settings tab closing tag.
     */
    do_action( 'kagg_settings_tab' );
  • nonce_life

    filter
    src/php/AutoVerify/AutoVerify.php line 924
    /**
     * This filter is documented in wp-includes/pluggable.php.
     */
    apply_filters( 'nonce_life', constant( 'DAY_IN_SECONDS' ) );
  • src/php/Helpers/Playground.php line 159
    do_action( 'admin_bar_menu', $wp_admin_bar );
  • src/php/CF7/Admin.php line 466
    apply_filters( 'do_shortcode_tag', $live_form, 'contact-form-7', [], [] );
  • src/php/Settings/Abstracts/SettingsBase.php line 1834
    do_action( 'hcap_admin_notices' );
  • src/php/FluentForm/Form.php line 565
    apply_filters( 'hcap_fluentform_is_login_form', false, $form_id, $form );
  • src/php/Admin/Privacy.php line 152
    apply_filters( 'hcap_privacy_policy_content', $content );
  • src/php/Wordfence/General.php line 140
    apply_filters( 'hcap_registration_request_owner', '', $id_info['id'] );
  • src/php/Helpers/HCaptcha.php line 158
    do_action( "hcap_signature_{$args['sign']}", $args );
  • src/php/Helpers/API.php line 739
    apply_filters( 'hcap_verify_request', $result, $error_codes, $error_info );
  • src/php/CF7/Admin.php line 462
    do_action( 'wpcf7_shortcode_callback', $contact_form, $atts );
  • src/php/ProfileBuilder/Register.php line 151
    apply_filters( 'wppb_before_processing_email_from_forms', wp_unslash( (string) $global_request['email'] ) );

Generated from hCaptcha for WP's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: