I tried to confirm this by upgrading a site, and my add to cart links work fine after the upgrade. Since it happens to you on more than one site, if they’re all on the same server, it’s possible it’s a plugin or theme that all the sites share.
Thanks for testing that @linux4me2
Can you do some conflict testing @enriquejros?
Please disable all the plugins aside from WooCommerce and switch to a default theme like Storefront. If you can do this on a duplicate site, that would be best, or at least have a complete backup. Then test again.
Do you have any caching in place? Server side or otherwise?
Thanks for your quick response
Hum, that’s odd. I tested it on three testing sites, in different servers, different plugins and settings. One of them is just WP 5.2-alpha + WC + Storefront.
Did you try it in a incognito window? It just happens to not logged in users…
That’s a good observation, I’ll give that a test.
I just tested as a logged out user and it’s working for me.
I am not able to replicate.
Thank you, I’ll keep on trying and testing, I’ll let you know if I can find the reason
Thanks! Please keep us posted. If this is an issue, we can get it opened with the Devs.
I tested with a not-logged-in and a logged-in user. The test site I tried it on is running Twenty Sixteen with WP Super Cache. It’s also got pretty permalinks set to “Post Name,” so there isn’t anything else in the query string other than the add to cart and ID. There’s got to be something in common with your affected sites. You might also look at what language the sites are using. According to the change log, it looks like some changes were made that might affect language.
- This reply was modified 3 years, 7 months ago by linux4me2.
Can you disable caching? There is another thread opened about the same time as this one and they are seeing this as well, the common element is caching.
Thanks @matthiasreinholz – I am still not able to replicate this at all. Are you able to test on a duplicate site with just WooCommerce active?
Can you let me know if you are using Ajax add to cart?
@shaneeckert yes I do. Also, I am using “Redirect to cart page after successful addition”. The redirect works but the cart stays empty.
I am just trying to narrowing down the source of the bug. On a local dev environment, I am not able to replicate it. On proper web servers, I can.
Ah ha! I was able to replicate it using a not-logged-in user, “redirect to cart page after successful addition” checked, and AJAX add to cart checked with a variable product. It only fails the first time, and subsequent add to carts work. I had to clear the session (close the browser) before it would fail again. I verified it both in Firefox and Chromium.
Ah, it might be related to this bug then. https://github.com/woocommerce/woocommerce/pull/23293 that looks like it will be addressed in
- The topic ‘add-to-cart link not working on 3.6.0 for not logged in users’ is closed to new replies.