Created
March 12, 2019 06:41
-
-
Save abid112/c944c38d86fcee9e81dd66c65cab2ea2 to your computer and use it in GitHub Desktop.
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…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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