• Resolved Josh

    (@jmccallweb)


    Hello,

    I am using Give on a client site and am getting a console error:

    Uncaught ReferenceError: jQuery is not defined
    at give-recurring.js?ver=1.4.2:8
    (anonymous) @ give-recurring.js?ver=1.4.2:8

    I’m not sure when this began happening but we’re running the most recent versions of WP and Give. We enqueue in the footer jQuery v2.1.4 from the Google repository. Give’s scripts are in the footer too, after jQuery.

    Our donation form is not working if Display Option is set to Modal, but it does work fine when set to Reveal. The modal opens but on submit it never directs to Paypal.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Josh

    (@jmccallweb)

    Just realized this may be an issue with our premium Give extension (recurring payments).

    Plugin Author Devin Walker

    (@dlocc)

    I believe the problem is that jQuery is enqueued in the footer and Give’s scripts are in the head. Try moving Give’s scripts to the footer. For Give core you can go to WP-Admin > Settings > Donations > Advanced > Scripts Loading and customize that option.

    If that doesn’t work, moving jQuery to load in the head should resolve the issue.

    Let me know how it goes and if you have anymore questions!

    Thread Starter Josh

    (@jmccallweb)

    They are all in the footer right now. I can try putting jQuery in the header but I am positive it’s loading (in the footer) before the Give scripts.

    Thread Starter Josh

    (@jmccallweb)

    Moving jQuery to the head solved the problem. I’d really like it in the footer. Is there a workaround?

    Thread Starter Josh

    (@jmccallweb)

    (And thanks!)

    Plugin Author Devin Walker

    (@dlocc)

    Yeah there are many plugins and code snippets to move scripts from head to footer or the other way around. Here’s one I found with high ratings: https://wordpress.org/plugins/scripts-to-footerphp/

    Thread Starter Josh

    (@jmccallweb)

    I can move it to the footer without a plugin. 🙂 I mean is there a way to get rid of the error with both scripts in the footer.

    Plugin Author Devin Walker

    (@dlocc)

    If jQuery is loading before the recurring scripts then I would think the problem would not persist. I’m not certain without digging in for a closer look why the issue would be occurring otherwise.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘jQuery Console Error’ is closed to new replies.