Hello @ajsneacky ,
First of all, both of the cookies represent the same functionality in WooCommerce –
Helps WooCommerce determine when cart contents/data changes.
More details on available cookies in WooCommerce can be found here – https://docs.woocommerce.com/document/woocommerce-cookies/
The caching plugins can be extreme at some level and tend to show old information though the data has been updated on the site. You can clear the cart items from WooCommerce’s sessions from wp-admin > WooCommerce > Status > Tools – https://prnt.sc/weefdz
If you have more problems after this, consider discussing this further with the WP Rocket team.
Thank you 🙂
laceyrod
(@laceyrod)
Automattic Happiness Engineer
Hi @ajsneacky –
Hope this information helped! Since this thread has been inactive for a bit, I’m going to mark it as Resolved now. Please feel free to open a new one if you have any further questions.
Cheers!
thnaks for information. I contacted wprocket team for explication.
Share the answer :
The two most common reasons why this might be happening are as follows:
1) WP Rocket caches cart fragments as explained here: Optimize WooCommerce Get Refreshed Fragments
So if that’s involved in the problem, installing the helper plugin (linked in that same article) should resolve it.
2) If the helper plugin makes no difference in the issue, then the next thing to consider is that the Menu Cart may not be fully “AJAX-ified”.
Using AJAX for cart widgets is required in order for them to be compatible with our page caching — you can’t rely on PHP to update it, because WP Rocket eliminates all PHP/MySQL processes from a page and creates static HTML output instead (as do most other caching plugins).
To fix it, there are two options:
A) “AJAX-ify” your cart widget.
The specifics will vary depending on your theme/plugin, but the concept is described in these posts:
https://wp-rocket.me/blog/using-woocommerce-dynamic-cart-wp-rocket/
http://docs.woothemes.com/document/show-cart-contents-total/
This approach requires custom development (which is outside of our Support Policy), so if you need help with that, you could try to find a developer at https://codeable.io.
— OR —
B) Prevent caching when the cart is in use.
If your e-commerce plugin sets a cookie when items are added to the cart you can use this to prevent caching.
Go to the Advanced tab in WP Rocket, find the box labelled “Don’t cache pages that use the following cookies”, and enter the cookie value.
Hello @ajsneacky ,
Thanks for sharing the update.
If I understand correctly the WP Rocket team has provided two solutions to fix the problem. I hope you got it working at this point.
Regards,
Rashed