Description

The wpforms_frontend_recaptcha_disable filter lets you disable loading and initializing reCAPTCHA on the frontend. This is useful for automated tests or controlled environments where reCAPTCHA should not run.

This filter prevents reCAPTCHA assets and initialization from loading. If you also want to skip CAPTCHA checks during processing, pair this with the wpforms_process_bypass_captcha filter.

parametertypedescription
$is_captcha_disabledboolWhether reCAPTCHA should be disabled on the frontend. Default is false.

Source

wpforms\src\Frontend\Captcha.php

Example

/**
 * Disable reCAPTCHA on the frontend for automated testing.
 */
add_filter( 'wpforms_frontend_recaptcha_disable', '__return_true' );

/* Also skip backend verification if needed */
// add_filter( 'wpforms_process_bypass_captcha', '__return_true' );

Reference Article