Title: sloppy added js code
Last modified: January 28, 2024

---

# sloppy added js code

 *  Resolved [imiblockchain.com](https://wordpress.org/support/users/dragan30/)
 * (@dragan30)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/sloppy-added-js-code/)
 * We use your free plugin. With Perfmatters plugin we delay all JavaScripts. But
   your plugin is generating the following error in the Developer Tools -> Console,
   due to sloppy added js code:
 * Uncaught TypeError: jQuery is not a function VM958:2 at <anonymous>:2:5 at (index):
   1270:4401 at new Promise (<anonymous>) at pmReplaceScript ((index):1270:4093)
   at async pmLoadDelayedScripts ((index):1270:3964) at async HTMLDocument.pmTriggerDelayedScripts((
   index):1270:853)
 * Would be great if you could fix your code that depends on jQuery and the jQuery
   library to resolve this error.
    -  This topic was modified 2 years, 3 months ago by [imiblockchain.com](https://wordpress.org/support/users/dragan30/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsloppy-added-js-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Mihai Joldis](https://wordpress.org/support/users/misulicus/)
 * (@misulicus)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/sloppy-added-js-code/#post-17381421)
 * Hi [@dragan30](https://wordpress.org/support/users/dragan30/)
 * It appears that the cause that you mentioned is not coming from the EDD core.
   We can see it in the page source and that seems to be added as custom code directly
   to the site or perhaps via another plugin?
 * That code block should perhaps add jQuery as a dependency as well to make sure
   it runs when jQuery is loaded. The Console tool also mentions that `Uncaught 
   TypeError: jQuery is not a function.` which means jQuery is not running when 
   that code is executed.
 * Try checking for any custom code or any other plugin that could be adding that
   functionality to see how it’s added.
 *  Thread Starter [imiblockchain.com](https://wordpress.org/support/users/dragan30/)
 * (@dragan30)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/sloppy-added-js-code/#post-17383070)
 * Fair enough, thanks! We did an in-depth search now and had to find out that the
   following add-on is causing the error:
 * [https://github.com/awesomemotive/edd-add-to-cart-redirect](https://github.com/awesomemotive/edd-add-to-cart-redirect)
 * Therefore, you are right. It’s not coming from EDD core. Please close this ticket.

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

The topic ‘sloppy added js code’ is closed to new replies.

 * ![](https://ps.w.org/easy-digital-downloads/assets/icon.svg?rev=3455837)
 * [Easy Digital Downloads – eCommerce Payments and Subscriptions made easy](https://wordpress.org/plugins/easy-digital-downloads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-digital-downloads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-digital-downloads/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-digital-downloads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-digital-downloads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-digital-downloads/reviews/)

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 2 replies
 * 2 participants
 * Last reply from: [imiblockchain.com](https://wordpress.org/support/users/dragan30/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/sloppy-added-js-code/#post-17383070)
 * Status: resolved