Title: Google Recaptcha module
Last modified: May 22, 2019

---

# Google Recaptcha module

 *  [Sajmir Doko](https://wordpress.org/support/users/sajdoko/)
 * (@sajdoko)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/google-recaptcha-module/)
 * Hi,
 * could you please consider maybe on next plugin update to do a check if shortcode
   exists on page before loading Google Recaptcha resources:
 * `wpcf7_recaptcha_enqueue_scripts()` on /wp-content/plugins/contact-form-7/modules/
   recaptcha.php:
 *     ```
        function wpcf7_recaptcha_enqueue_scripts() {
            $service = WPCF7_RECAPTCHA::get_instance();
            global $post;
            if ( ! $service->is_active() ) {
                return;
            }
            $url = add_query_arg(
                array(
                    'render' => $service->get_sitekey(),
                ),
                'https://www.google.com/recaptcha/api.js'
            );
            if( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'contact-form-7') || has_shortcode( $post->post_content, 'contact-form') ) {
                wp_enqueue_script( 'google-recaptcha', $url, array(), '3.0', true );
            }
        }
       ```
   
 * Thank’s
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgoogle-recaptcha-module%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Google Recaptcha module’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [reCAPTCHA](https://wordpress.org/support/topic-tag/recaptcha/)

 * 0 replies
 * 1 participant
 * Last reply from: [Sajmir Doko](https://wordpress.org/support/users/sajdoko/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/google-recaptcha-module/)
 * Status: not a support question