jQuery not defined error when jQuery is deferred
-
Hello,
I’m using your plugin “Accept Donations with PayPal & Stripe” together with the Themify Corporate theme, which has an option to defer jQuery for better performance.
When defer is enabled, I get the error:
Uncaught ReferenceError: jQuery is not defined(at inline script on the page, around the .wpedon-form styles/scripts).
This happens probably because the plugin adds inline JavaScript that runs before jQuery is loaded.Could you update the plugin so that:
- It properly declares jquery as a dependency when enqueuing scripts (using wp_enqueue_script with array(‘jquery’)).
- All inline scripts are wrapped safely;
- Or the inline code is moved to a properly enqueued file that depends on jQuery.
This would make the plugin compatible with optimization practices and themes that defer jQuery.
Thank you!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.