• Hello,
    I had a code preventing the recaptcha badge to appear on all pages but only on those containing the forms. Since version 5.2.2 this code has stopped working – perhaps the script IDs have been changed? See code below:

    
    function conditionally_load_plugin_js_css(){
    	if(!is_page(array(48)) ) { # Only load CSS and JS on ppage/post #48	
    		wp_dequeue_script('contact-form-7'); # Restrict scripts.
    		wp_dequeue_script('google-recaptcha');
    		wp_dequeue_style('contact-form-7'); # Restrict css.
    	}
    }
    add_action( 'wp_enqueue_scripts', 'conditionally_load_plugin_js_css' ); 
    

    I am using WP 5.5. The above code works fine with CF7 version 5.1.9 but after upgrading to 5.2.2 the recaptcha badge pops up on every page and it is very annoying.

    • This topic was modified 4 years, 6 months ago by cleoni.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Yes, I am having the same issue. Seems like something has changed and it isn’t working anymore. Any update on this?

Viewing 1 replies (of 1 total)
  • The topic ‘Dequeue script for preventing Recaptcha v3 does not work anymore’ is closed to new replies.