Inline script Tags Not Optimized
-
I’m getting a javascript error in my cart because
jQuery
isn’t found. This is because an inline script added from another plugin is placed above the optimize/concatenated js file placed before</body>
To reproduce go to:
https://savewithledlight.com/product/led-liquid-cooled-a15-6w/Click “Add to Cart”
Click “View Cart”The javascript error appears on this page (need an item in the cart):
https://savewithledlight.com/cart/If you view the page source, you will see near the bottom of the screen a few inline
<script>
tags that are before the optimized javascript file (where jQuery is included).I know there is the option to include the javascript in
<head>
but I really don’t want to do that. Also, the issue only seems to happen on the cart page, not others on my site.The relevant plugins I’m using are:
autoptimize
woocommerce
enhanced-e-commerce-for-woocommerce-storeSo is there a reason why Autoptimize is not picking up these inline scripts? They’re being inserted with
add_action('wp_footer', '...')
- The topic ‘Inline script Tags Not Optimized’ is closed to new replies.