The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

jQuery Conflict - Breaks Enqueue (4 posts)

  1. Seth Rubenstein
    Posted 3 years ago #

    I was using 1.6.4 and just upgraded to
    The new * Tweak - Check for, and enforce, a minimum version of jQuery introduced in 1.6.5 I imagine is breaking my scripts and jQuery enqueue.

    I was already using 1.8 now with this upgrade I can see that somehow WooCommerce is over-riding my enqueue and using the included 1.7 version of jQuery included in WordPress.

    How can I disable this awful behavior?


  2. Martin
    Posted 3 years ago #

    Did you find a fix to this?
    Just wondering whether this JQuery thing is borking the variations dropbox in the theme I'm using.

  3. kangabell
    Posted 3 years ago #

    In woocommerce.php, line 1180, you will find the woocommerce script that overrides the jquery version. Their note here:

    WC requires jQuery 1.7 since it uses functions like .on() for events. If, by the time wp_print_scrips is called, jQuery is outdated (i.e not using the version in core) we need to deregister it and register the core version of the file.

    Line 312 is where the add_action for this is.

    I too am having an issue with this, because my theme is using the Flexslider slideshow, which is using a different version of jQuery. Either I remove woocommerce's jquery scripts (and break some of the woocommerce functionality), or I keep it and the slideshow doesn't show. Anyone with input on getting everything to work in harmony please let us know!

  4. kangabell
    Posted 3 years ago #

    Well I was able to resolve my issue by changing the jquery version used by Flexslider, which was an older version, to 1.7 in order to match Woocommerce, and everything seems to work now. So if others are having similar issues, I suggest finding all instances throughout your site in which jquery is being loaded, and just make sure they all match to the same version. Ideally, I'd imagine you'd just load it once in your functions.php (but I'm going to leave mine be, since it works!)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic