Problem is only with page cache
Hello @karamakhras
Thank you for reaching out and I am happy to assist you with this.
I’ve checked your website, and I see that Page Caching is active. I’ve tried to add the products and get to the 10% discount and everything is working as expected. The bar fills to 10% and once I click on the checkout, the 10% discount is added.
Can you please confirm you are still experiencing the problem?
Thanks!
Thank you for your quick respond!
I have disabled the cache for the shop page, I will enable it to make it viewable by your side.
Hello @karamakhras
Thank you for your reply.
Yes, I can see that once the page is reloaded the discount does not change.
As per WooCommerce suggestion, the shop page should be excluded from caching. However, there are some things that you can try besides that. The best solution would be if that discount bar could fire with ajax, however, I am not sure if the plugin you are using has that ability.
You can also try to disable expires header and cache-control header for HTML&XML in Performance>Browser Cache, to avoid the page being cached in the browser and see if that helps!
Alternatively, the solution is to use Page Fragment Caching and use <mfunc>
to war the PHP code in the specific template and exclude it from the Page Caching.
You can check more details about Page Fragment Caching in our FAQ.
I hope this helps!
Thanks!
Thankyou so much! I will try them out 🙂