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.
// 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
-
hcap_print_hcaptcha_scripts
filter/** * Filters whether to print hCaptcha scripts. */ apply_filters( 'hcap_print_hcaptcha_scripts', hcaptcha()->form_shown ); -
hcap_auto_verify_register
action/** * This action is documented in src/php/Sendinblue/Sendinblue.php */ do_action( 'hcap_auto_verify_register', $output ); -
hcap_protect_form
filter/** * Filters the protection status of a form. */ apply_filters( 'hcap_protect_form', true, $args['id']['source'], $args['id']['form_id'] ); -
hcap_maxmind_db_path
filter/** * Filters MaxMind country DB path. */ apply_filters( 'hcap_maxmind_db_path', '' ); -
hcap_signature
action/** * Display hCaptcha signature. */ do_action( 'hcap_signature', $this->get_active_divi_component() . '-login' ); -
hcap_send_plugin_stats
action/** * Statistics switch is turned on, send plugin statistics. */ do_action( 'hcap_send_plugin_stats' ); -
hcap_verify_fst_token
filter/** * Filters the result of the Form Submit Time token verification. */ apply_filters( 'hcap_verify_fst_token', $fst_obj->verify_token( $min_submit_time ) ); -
hcap_verify_host
filter/** * Filters the verification host. */ apply_filters( 'hcap_verify_host', $verify_host ); -
/** * Filters whether native WordPress login verification can be skipped. */ apply_filters( 'hcap_wp_login_can_skip_verification', $can_skip ); -
hcap_activate
filter/** * Filters the hCaptcha activation flag. */ apply_filters( 'hcap_activate', $activate ); -
hcap_add_csp_headers
filter/** * Filters whether to add Content Security Policy (CSP) headers. */ apply_filters( 'hcap_add_csp_headers', false, $headers ); -
hcap_allow_send_plugin_stats
filter/** * Override the Statistics setting and forced-send decision. */ apply_filters( 'hcap_allow_send_plugin_stats', $allow ); -
hcap_api_host
filter/** * Filters the API host. */ apply_filters( 'hcap_api_host', $api_host ); -
hcap_api_src
filter/** * Filters the API source url with params. */ apply_filters( 'hcap_api_src', add_query_arg( $params, $this->get_api_url() ) ); -
hcap_auto_verify_entry
filter/** * Filter entry data for the server-registered automatic form. */ apply_filters( 'hcap_auto_verify_entry', $entry ); -
/** * Filters an unmatched request for an action that has auto-verified forms. */ apply_filters( 'hcap_auto_verify_unmatched_form', [], $path, $widget_id ); -
hcap_blacklist_ip
filter/** * 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 ) ); -
hcap_cf7_has_field
filter/** * Filter whether a form has a field of a given type. */ apply_filters( 'hcap_cf7_has_field', $has_field, $submission, $type ); -
hcap_check_honeypot_field
filter/** * Filters the result of the honeypot field check. */ apply_filters( 'hcap_check_honeypot_field', $check ); -
/** * Filters hCaptcha command palette commands. */ apply_filters( 'hcap_command_palette_commands', $commands ); -
hcap_csp_headers
filter/** * Filters the Content Security Policy (CSP) headers. */ apply_filters( 'hcap_csp_headers', $hcap_csp_headers ); -
hcap_delay_api
filter/** * Filters delay time for the hCaptcha API script. */ apply_filters( 'hcap_delay_api', (int) ( $settings->get( 'delay' ) ) ); -
hcap_delay_api_event
filter/** * Filters event-based loading of the hCaptcha API script. */ apply_filters( 'hcap_delay_api_event', '' ); -
hcap_delay_api_selector
filter/** * Filters delay API selector. */ apply_filters( 'hcap_delay_api_selector', '' ); -
/** * Filters the disposable email domains blocklist. */ apply_filters( 'hcap_disposable_email_domains', $domains ); -
hcap_error_messages
filter/** * 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 ... ); -
/** * Filters the event cleanup batch size for tests and constrained hosts. */ apply_filters( 'hcap_events_cleanup_batch_size', self::CLEANUP_BATCH_SIZE ); -
hcap_events_max_rows
filter/** * Filters the event row limit for deterministic tests and smaller sites. */ apply_filters( 'hcap_events_max_rows', self::MAX_ROWS ); -
hcap_form_args
filter/** * Filters the hCaptcha form arguments. */ apply_filters( 'hcap_form_args', $args ); -
hcap_form_fields
filter/** * Filter the form fields. */ apply_filters( 'hcap_form_fields', $this->form_fields, $this ); -
hcap_fst_token
filter/** * Filters the generated token for the Form Submit Time. */ apply_filters( 'hcap_fst_token', $token ); -
hcap_fst_token_ttl
filter/** * Filters the time-to-live (TTL) for the Form Submit Time token. */ apply_filters( 'hcap_fst_token_ttl', self::DEFAULT_TOKEN_TTL ); -
hcap_hcaptcha_content
filter/** * Filters the content of the hCaptcha form. */ apply_filters( 'hcap_hcaptcha_content', HCaptcha::form( $atts ), $atts ); -
hcap_is_disposable_email
filter/** * Filters the disposable email status. */ apply_filters( 'hcap_is_disposable_email', $this->is_disposable_email( $email ), $email ); -
hcap_language
filter/** * Filters hCaptcha language. */ apply_filters( 'hcap_language', $this->get( 'language' ) ); -
hcap_login_limit_exceeded
filter/** * Filters the login limit exceeded status. */ apply_filters( 'hcap_login_limit_exceeded', $count >= $login_limit ); -
/** * Filters the list of migration wizard detectors. */ apply_filters( 'hcap_migration_wizard_detectors', $default_detectors ); -
hcap_mode
filter/** * Filters the current operating mode to get a relevant key pair. */ apply_filters( 'hcap_mode', $this->get( 'mode' ) ); -
/** * Filters whether to print the invisible hCaptcha disclosure. */ apply_filters( 'hcap_print_invisible_disclosure', false, $args, $widget_params ); -
hcap_register_form
action/** * Register hCaptcha form. */ do_action( 'hcap_register_form', $args ); -
hcap_secret_key
filter/** * Filters the current secret key. */ apply_filters( 'hcap_secret_key', $this->get_keys()['secret_key'] ); -
hcap_settings_init_args
filter/** * Filters the settings system initialization arguments. */ apply_filters( 'hcap_settings_init_args', [] ); -
hcap_shuffle_notifications
filter/** * Filter whether to shuffle notifications. */ apply_filters( 'hcap_shuffle_notifications', true ); -
hcap_site_key
filter/** * Filters the current site key. */ apply_filters( 'hcap_site_key', $this->get_keys()['site_key'] ); -
hcap_theme
filter/** * Filters the current theme to get a relevant key pair. */ apply_filters( 'hcap_theme', $theme ); -
hcap_trusted_address_headers
filter/** * Filters the list of address headers to trust. */ apply_filters( 'hcap_trusted_address_headers', $address_headers, $remote_addr, $standard_address_headers ); -
hcap_whitelist_ip
filter/** * Filters the user IP to check whether it is allowlisted. */ apply_filters( 'hcap_whitelist_ip', false, hcap_get_user_ip( false ) ); -
hcap_widget_params
filter/** * Filters documented hCaptcha render parameters for an individual widget. */ apply_filters( 'hcap_widget_params', $params, $args ); -
/** * Filters whether the signed native login form is protected. */ apply_filters( 'hcap_wp_login_protection_enabled', $enabled ); -
hcaptcha_activate_plugins
filter/** * Filter the list of plugin to activate. */ apply_filters( 'hcaptcha_activate_plugins', $plugins, $first_only ); -
hcaptcha_activated_plugin
action/** * Fires after a plugin has been activated. */ do_action( 'hcaptcha_activated_plugin', $plugin, $network_wide ); -
kagg_settings_fields
filter/** * Filters fields and their print methods to allow custom fields. */ apply_filters( 'kagg_settings_fields', $this->fields ); -
kagg_settings_header
action/** * Fires before the settings tab closing tag. */ do_action( 'kagg_settings_header' ); -
kagg_settings_tab
action/** * Fires before the settings tab closing tag. */ do_action( 'kagg_settings_tab' ); -
nonce_life
filter/** * This filter is documented in wp-includes/pluggable.php. */ apply_filters( 'nonce_life', constant( 'DAY_IN_SECONDS' ) ); -
do_shortcode_tag
filterapply_filters( 'do_shortcode_tag', $live_form, 'contact-form-7', [], [] ); -
hcap_admin_notices
actiondo_action( 'hcap_admin_notices' ); -
apply_filters( 'hcap_fluentform_is_login_form', false, $form_id, $form ); -
hcap_privacy_policy_content
filterapply_filters( 'hcap_privacy_policy_content', $content ); -
apply_filters( 'hcap_registration_request_owner', '', $id_info['id'] ); -
do_action( "hcap_signature_{$args['sign']}", $args ); -
hcap_verify_request
filterapply_filters( 'hcap_verify_request', $result, $error_codes, $error_info ); -
wpcf7_shortcode_callback
actiondo_action( 'wpcf7_shortcode_callback', $contact_form, $atts ); -
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: