Hi @imran4191,
Thanks for reaching out!
To disable reCAPTCHA for automated testing, you can use the code snippet shared in our guide here.
/**
* Disable CAPTCHA for all logged-in users
*
* @link https://wpforms.com/developers/how-to-disable-recaptcha-for-automated-testing/
*/
// Skip CAPTCHA for logged in users only.
add_action( 'plugins_loaded', static function() {
// Check if the current visitor is a logged in user.
if ( is_user_logged_in() ) {
add_filter( 'wpforms_process_bypass_captcha', '__return_true' );
add_filter( 'wpforms_frontend_recaptcha_disable', '__return_true' );
remove_action( 'wpforms_frontend_output', [ wpforms()->get( 'frontend' ), 'recaptcha' ], 20 );
}
}, 11 );
In case you need it, here’s a tutorial with the most common ways to add custom code, including this type of snippet. For a beginner-friendly option, I recommend using the WPCode plugin.
I hope this helps! Please feel welcome to let me know if you have any further questions.