Title: Can&#8217;t not dequeue recaptcha scripts
Last modified: February 25, 2021

---

# Can’t not dequeue recaptcha scripts

 *  Resolved [lsdevign](https://wordpress.org/support/users/lsdevign/)
 * (@lsdevign)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cant-not-dequeue-recaptcha-scripts/)
 * Dear Support,
 * Since your latest update, my script below to only load the recaptcha scripts 
   on pages that require them, stopped working:
 *     ```
       add_filter( 'wpcf7_load_js', '__return_false' );
   
       function contact_scripts() {
           wp_dequeue_script('wpcf7-recaptcha');
           wp_dequeue_script('google-recaptcha');
           if (is_front_page() || is_singular('portfolio') || is_post_type_archive('nieuws') || is_singular('nieuws') || is_page_template(array('page-templates/template-info.php', 'page-templates/template-contact.php')) || is_checkout()) {
               if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
                   wpcf7_enqueue_scripts();
                   wp_enqueue_script( 'wpcf7-recaptcha' );
                   wp_enqueue_script( 'google-recaptcha' );
               }
           }
       }
       add_action( 'wp_enqueue_scripts', 'contact_scripts' );
       ```
   
 * Any idea on how to make this work again?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cant-not-dequeue-recaptcha-scripts/#post-14101328)
 * Same problem. any solution?
 *  [Daniram](https://wordpress.org/support/users/daniram/)
 * (@daniram)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cant-not-dequeue-recaptcha-scripts/#post-14111458)
 * See here: [https://wordpress.org/support/topic/site-speed-slower-after-update-today/#post-14111454](https://wordpress.org/support/topic/site-speed-slower-after-update-today/#post-14111454)
 *  Thread Starter [lsdevign](https://wordpress.org/support/users/lsdevign/)
 * (@lsdevign)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cant-not-dequeue-recaptcha-scripts/#post-14112437)
 * [@daniram](https://wordpress.org/support/users/daniram/) Thank you so much!
 * Kind regards,
 * Laurens
 *  Thread Starter [lsdevign](https://wordpress.org/support/users/lsdevign/)
 * (@lsdevign)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cant-not-dequeue-recaptcha-scripts/#post-14112438)
 * This is resolved

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Can’t not dequeue recaptcha scripts’ 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/)

 * 4 replies
 * 3 participants
 * Last reply from: [lsdevign](https://wordpress.org/support/users/lsdevign/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/cant-not-dequeue-recaptcha-scripts/#post-14112438)
 * Status: resolved