Resumo de IA
Descrição
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.
| parâmetro | tipo | descrição |
|---|---|---|
$is_captcha_disabled | bool | Whether reCAPTCHA should be disabled on the frontend. Default is false. |
Fonte
wpforms\src\Frontend\Captcha.php
Exemplo
/**
* 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' );