Title: jQuery problem
Last modified: June 17, 2020

---

# jQuery problem

 *  Resolved [masterross](https://wordpress.org/support/users/masterross/)
 * (@masterross)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-31/)
 * I’m getting an error when using jQuery v2 and higher.
 *     ```
       Uncaught ReferenceError: jQuery is not defined
       ```
   
 * In this section:
 *     ```
       <script type="text/javascript">
       jQuery(function($) { 
       /* WooCommerce Facebook Integration Event Tracking */
       fbq('track', 'ViewContent', {
           "source": "woocommerce",
           "version": "4.2.0",
           "pluginVersion": "1.11.4",
           "content_name": "\u0414\u0430\u043c\u0441\u043a\u0438 \u0441\u043c\u0430\u0440\u0442 \u0447\u0430\u0441\u043e\u0432\u043d\u0438\u043a Huawei Watch GT 2 42mm",
           "content_ids": "[\"ucrgt242_14830\"]",
           "content_type": "product",
           "value": "359",
           "currency": "BGN"
       });
        });
       </script>
       ```
   
 * Any idea of how to fix it?

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

 *  [SkyVerge](https://wordpress.org/support/users/skyverge/)
 * (@skyverge)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-31/#post-13000640)
 * Hey [@masterross](https://wordpress.org/support/users/masterross/),
 * Thanks for writing in! That’s an interesting question. Would it be possible to
   let me know how you’ve implemented a different jQuery version so that I can try
   and replicate this myself? I’m wondering if this is a case of the new version
   being loaded after the Facebook JavaScript is written to the HTML document.
 * It would need to be loaded beforehand to avoid the uncaught reference. As far
   as I’m aware, it still uses the jQuery and $ references even in the later releases.
 * Could you let me know how you’ve implemented this so I can take a closer look
   to see if there is anything I can suggest?
 * Cheers!
 * Simon.
 *  Thread Starter [masterross](https://wordpress.org/support/users/masterross/)
 * (@masterross)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-31/#post-13001211)
 * Hi Simon,
 * Thanks for the fast reply!
 * I found out that my Asset cleanup automatically defer the upgraded JS script.
   
   That’s why I had a problem with the FB plugin. Anyway, after excluding the new
   jquery lib from Asset cleanup it works.
 * I hope this will help others with the same problem.
 * Regards,
    Ross
 *  [SkyVerge](https://wordpress.org/support/users/skyverge/)
 * (@skyverge)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-31/#post-13002602)
 * Hey [@masterross](https://wordpress.org/support/users/masterross/),
 * Ahhh, yes! That sounds like it would be the culprit. Thanks for letting me know,
   sounds like you’re all sorted now.
 * If you have any other questions or issues, please don’t hesitate to let me know
   🙂
 * Cheers,
 * Simon.

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

The topic ‘jQuery problem’ is closed to new replies.

 * ![](https://ps.w.org/facebook-for-woocommerce/assets/icon.svg?rev=3469606)
 * [Meta for WooCommerce](https://wordpress.org/plugins/facebook-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [SkyVerge](https://wordpress.org/support/users/skyverge/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-31/#post-13002602)
 * Status: resolved