• Resolved jetxpert

    (@jetxpert)


    Good Day!

    The following WooCommerce JS file (Cookie) is impacting another plugin we’re using, WPFront Notification Bar:

    woocommerce/assets/js/js-cookie/js.cookie.min.js

    Specifically, after installing your plugin, WPFront Notification Bar continues to work with no issues.

    However, when we dequeue the above JS file, WPFront Notification Bar stops working. That is, our website’s top banner does not display.

    For additional details, please refer to this forum topic.

    Any idea what’s going on? Strange!

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi there,

    Thanks for reaching out.

    I’d recommend getting advice from WPFront Notification Bar developers so that they can help achieve full compatibility with WooCommerce. I see that you posted on the plugin forum support page but you can also reach out to them through their website contact page here https://wpfront.com/contact/.

    Cheers.

    Thread Starter jetxpert

    (@jetxpert)

    @rainfallnixfig,

    Thank you. Yes, we’ve reached out to the developer.

    Meanwhile, can you tell us what is the purpose of the note (JS) file?

    Cheers!

    Mirko P.

    (@rainfallnixfig)

    Hey @jetxpert,

    You can read more about Cookies set by WooCommerce and what they do here: https://docs.woocommerce.com/document/woocommerce-cookies/.

    I’ve found what could be a possible fix for this issue:

    https://github.com/rynaldos/woocommerce-js-cookie-fix

    Make sure you have a full backup in place of your site and database before making any changes. You could consider using a service like Jetpack. If something goes wrong after installing the plugin, it’s nice to know that you can restore your site to the previous state.

    Thanks.

    Thread Starter jetxpert

    (@jetxpert)

    @rainfallnixfig,

    Thanks again!

    We reviewed the link you sent. Unfortunately, it does not talk about the js (cookie) file provided above.

    We also tried the plugin (snippet) you provided, but did not help either. The plugin dequeue’s the js (cookie) file on all pages. The WPFront Notification Bar (WPNB) did not work after installing it.

    Based on the above test, we believe the WPNB plugin has a php code line that permanently searches for a cookie-type js file for it to function properly. Unfortunately, it has attached itself to your js (cookie) file.

    Again, thank you!

    PS: You’re welcome to install the above plugin in your test website to see if you can replicate the issue.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    The js-cookie documentation can be found in Github here: https://github.com/js-cookie/js-cookie. You can download the source code on this page.

    I’m quite confident that WPFront Notification Bar developers should be able to assist you with this issue and provide a solution.

    Feel free to get back if you have any other questions!

    Cheers.

    Mirko P.

    (@rainfallnixfig)

    We’ve not heard back from you in a while so I’ll go ahead and mark this thread as resolved. Hopefully, you were able to find a way forward with the issue.

    Please feel free to create a new thread if you have further questions.

    Thanks.

    Thread Starter jetxpert

    (@jetxpert)

    @rainfallnixfig,

    We solved the issue as follows:

    (1) We dequeued the JS cookie file (shown above) injected by WooCommerce using the plugin, Perfmatters (an excellent speed-boosting plugin). It appears other plugins depend on the same cookie.min.js file and pull it from WooCommerce – if present – when called upon.

    (2) We added the following code to the header section of our website:

    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js"></script>

    Results:

    (1) Website is lighter (2kb less)
    (2) Website delivers the needed file to all plugins that depend on it.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WC Cookie Affecting Another Plugin’ is closed to new replies.