The contact-form-7 wpcf7 recaptcha verify response hook.
Published Date - July 22, 2023
$is_human = apply_filters( 'wpcf7_recaptcha_verify_response',
$is_human, $response_body );
$is_human
$response_body
The following example is for adding a hook callback.
// define the wpcf7_recaptcha_verify_response callback
function custom_wpcf7_recaptcha_verify_response( $is_human, $response_body ){
//custom code here
return $is_human
}
//add the action
add_filter('wpcf7_recaptcha_verify_response', 'custom_wpcf7_recaptcha_verify_response', 10, 2)
The filter is defined in the following location(s).
contact-form-7/modules/recaptcha/service.php
$is_human = apply_filters( 'wpcf7_recaptcha_verify_response',
$is_human, $response_body );