Title: autoptimize captcha plugin conflict
Last modified: August 21, 2020

---

# autoptimize captcha plugin conflict

 *  [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/)
 * autoptimize captcha plugin conflict,,, when the above page is loaded the captcha
   box is not available but when auto is disabled then the captch box appears also
   sometimes the site name(font type paparika) in header wont load but loads normal
   font
    -  This topic was modified 5 years, 9 months ago by [anand99](https://wordpress.org/support/users/anand99/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fautoptimize-captcha-plugin-conflict%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/page/2/?output_format=md)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13294499)
 * Well, I guess you know the drill by now; First and foremost try to identify what
   is breaking things by just disabling CSS or JS or HTML or Image optimization (
   incl. lazyload).
 * Once you know that, dive in and try identify what code/ files (CSS or JS) are
   responsible for the broken feature and try excluding that.
 * If the problem is with JS, chances are you’ll find useful information on your
   browser’s developer console.
 * There’s more info in the troubleshooting tips and info on exclusions in [the AO FAQ](https://wordpress.org/plugins/autoptimize/#faq).
 * hope this helps,
    frank
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13296358)
 * the issue is not there when also aggregate inline is disabled,,after disabling
   it the browser console message is`A cookie associated with a cross-site resource
   at http://www.google.com/ was set without the`SameSite`attribute. It has been
   blocked, as Chrome now only delivers cookies with cross-site requests if they
   are set with`SameSite=None`and`Secure`. You can review cookies in developer tools
   under Application>Storage>Cookies and see more details at [https://www.chromestatus.com/feature/5088147346030592](https://www.chromestatus.com/feature/5088147346030592)
   and [https://www.chromestatus.com/feature/5633521622188032](https://www.chromestatus.com/feature/5633521622188032).
   
   autoptimize_aec3283004ab7103c1064cb35a52987d.js:2 JQMIGRATE: Migrate is installed,
   version 1.4.1 DevTools failed to load SourceMap: Could not load content for /
   wp-content/cache/autoptimize/css/slick-theme.min.css.map: HTTP error: status 
   code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE’
 * and after enabling it the message is
 *     ```
       reCAPTCHA couldn't find user-provided function: anr_onloadCallback
       autoptimize_e8a656ebc632e200d2c3872012b2231a.js:4 JQMIGRATE: Migrate is installed, version 1.4.1
       DevTools failed to load SourceMap: Could not load content for /wp-content/cache/autoptimize/css/slick-theme.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
       ```
   
 * iam not able to go further on excluding this plugin scripts or entire plugin
   
   till date i didnt face this issue but suddenly without any plugin update or theme
   update but i have added few codes in function.php for phone no
 *     ```
           function wooc_extra_register_fields() {?>
                  <p class="form-row form-row-wide">
                  <label for="reg_billing_phone"><?php _e( 'Phone', 'woocommerce' ); ?></label>
                  <input type="text" class="input-text" name="billing_phone" id="reg_billing_phone" value="<?php esc_attr_e( $_POST['billing_phone'] ); ?>" />
                  </p>
   
                  <div class="clear"></div>
                  <?php
            }
            add_action( 'woocommerce_register_form_start', 'wooc_extra_register_fields' );
   
       function wooc_validate_extra_register_fields( $username, $email, $validation_errors ) {
   
   
   
   
   
   
   
              if ( isset( $_POST['billing_phone'] ) && empty( $_POST['billing_phone'] ) ) {
   
                     $validation_errors->add( 'billing_phone_error', __( '<strong>Error</strong>: Phone is required!.', 'woocommerce' ) );
   
              }
              if ( isset( $_POST['billing_phone'] ) ) {
          $hasPhoneNumber= get_users('meta_value='.$_POST['billing_phone']);
          if ( !empty($hasPhoneNumber)) {
            $validation_errors->add( 'billing_phone_error', __( '<strong>Error</strong>: Mobile number is already used!.', 'woocommerce' ) );
          }
       }
   
   
   
       }
   
   
   
       add_action( 'woocommerce_register_post', 'wooc_validate_extra_register_fields', 10, 3 );
   
       function wooc_save_extra_register_fields( $customer_id ) {
           if ( isset( $_POST['billing_phone'] ) ) {
                        // Phone input filed which is used in WooCommerce
                        update_user_meta( $customer_id, 'billing_phone', sanitize_text_field( $_POST['billing_phone'] ) );
                 }
   
       }
       add_action( 'woocommerce_created_customer', 'wooc_save_extra_register_fields' );
       ```
   
    -  This reply was modified 5 years, 9 months ago by [anand99](https://wordpress.org/support/users/anand99/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13296386)
 * OK, if the issue isn’t there when “also aggregate inline JS” is disabled, then
   check the HTML source for inline JS that refers to recaptcha and exclude that
   by choosing a keyword from that inline JS and adding that to the JS exclusion
   field.
 * hope this helps,
    frank
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13299195)
 * how to find HTML source for inline JS that refers to recaptcha ,please send a
   snapshot
    -  This reply was modified 5 years, 9 months ago by [anand99](https://wordpress.org/support/users/anand99/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13299203)
 * [This should help](https://www.view-page-source.com/howto-see-html-code-different-browsers/)
   🙂
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13299315)
 * the best i could do was to add recaptcha__en.js in the Exclude scripts from Autoptimize:
   js
 * from
 *     ```
       </style>
       <link rel="stylesheet" type="text/css" href="https://www.gstatic.com/recaptcha/releases/aUMtGvKgJZfNs4PdY842Qp03/styles__ltr.css">
       <script nonce="VAwdnS2P2FQ6RynrWOs59w" type="text/javascript">window['__recaptcha_api'] = 'https://www.google.com:443/recaptcha/';</script>
       <script type="text/javascript" src="https://www.gstatic.com/recaptcha/releases/aUMtGvKgJZfNs4PdY842Qp03/recaptcha__en.js" nonce="VAwdnS2P2FQ6RynrWOs59w">
       ```
   
 * it doesn’t work
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13299391)
 * No, inline script is what is in a `<script` tag that has no `src`, so maybe try`
   __recaptcha_api` instead?
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13299426)
 * now it seems to be working, but i need to know why suddenly this happened ,i 
   have been using captcha plugin along with auto for a year
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13299453)
 * with every theme and plugin update things can change anand99 and that means things
   can break as well, with or without Autoptimize. ideally you test your site after
   each update to ensure all is well.
 * have a nice Sunday 🙂
    frank
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13308471)
 * recently i have updated few plugins along with theme and the issue is partially
   solved,
    before updation without using __recaptcha_api captcha box wont appear
   but after various plugins and theme updation the captcha box will not appear 
   the first time the page is loaded but appears after one refresh
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13310770)
 * now even with __recaptcha_api in the exclusion list the captcha box is not been
   shown but on disabling Also aggregate inline JS the captcha box shows
    -  This reply was modified 5 years, 9 months ago by [anand99](https://wordpress.org/support/users/anand99/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13310799)
 * in that case you’ll have to go through the same process to find what inline recaptcha
   JS needs to be excluded anand99 or (a lot easier) simply disable “also aggregate
   inline JS” off course 🙂
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13390993)
 * now with js,__recaptcha_api in the js exclusion list the captcha issue is solved
   but header disappears
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13391378)
 * can you copy/paste your full JS exclusion field anand99 ?
 *  Thread Starter [anand99](https://wordpress.org/support/users/anand99/)
 * (@anand99)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/#post-13391493)
 * wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery
 * here
    __recaptcha_api has been removed temporarily
    -  This reply was modified 5 years, 9 months ago by [anand99](https://wordpress.org/support/users/anand99/).

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/page/2/?output_format=md)

The topic ‘autoptimize captcha plugin conflict’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 24 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/autoptimize-captcha-plugin-conflict/page/2/#post-13392727)
 * Status: not resolved