Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is for the WordPress user who uses Contact Form-7 integration for reCAPTCHA v3 . Google introduced a new reCAPTCHA v3 which is run on the background of the webpage. So no need to perform that checkbox and stupid image puzzle anymore. Google detects automatically with their algorithm of Human or Bot. In reCAPTCHA v3 in Contact Form-7 is perf…
//For one page
add_action('wp_print_scripts', function () {
if ( !is_page('contact-us') ){
wp_dequeue_script( 'google-recaptcha' );
}
});
//For multiple pages
add_action('wp_print_scripts', function () {
if ( !is_page( array( 'contact-us', 'my-account', 'checkout') ) ) {
wp_dequeue_script( 'google-recaptcha' );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.