WooCommerce javascript required for non-WooCommerce elements
-
While optimizing the site via Perfmatters concerning javascript defer and delay options, I noticed that promo popup and cookie bar don’t function properly unless js.cookie.min.js
is excluded from JS delay. I performed another experiment where WooCommerce is disabled on the front page and the two elements (via Perfmatters’ script manager), again, failed to trigger properly. Promo popup and cookie bar seem completely unrelated to WooCommerce. Does this mean promo popup and cookie bars are not unavailable unless WooCommerce plugin is installed? Is this the result of bad coding?
-
This topic was modified 4 months, 1 week ago by
josh-6874.
Hello,
Please send us your website admin access so we can check it? Also, send us a link to the page where we can test this functionality and see how it works.
Kind Regards
This is happening on the front page at https://www.jmic.co.kr
Thanks in advance for looking into this.
As we can see, the popup works correctly on this page at the moment https://gyazo.com/d9b2d6c7a6ade489c8b5d8a47498193b
Could you please clarify how to reproduce the problem?
Go to Settings -> Perfmatters, and click JavaScript tab. Under JavaScript Delay exclusions, js.cookie
(js.cookie.min.js) must be added to the list – otherwise, the promo popup won’t trigger.
Attachments:
You must be
logged in to view attached files.
Yes, because you added the promo pop-up to the list as well. And cookie script is its dependency. So you need to either remove both from the list or keep them there.
My question is why is WooCommerce JS file used for non-WooCommerce element such as promo popup?
If the WooCommerce plugin is disabled, our theme loads our own version of this library from /woodmart/js/libs/cookie.min.js
.
Thanks for the clarification.
The topic ‘WooCommerce javascript required for non-WooCommerce elements’ is closed to new replies.