Support » Plugin: WooCommerce » add-to-cart link not working on 3.6.0 for not logged in users

Viewing 12 replies - 16 through 27 (of 27 total)
  • linux4me2

    (@linux4me2)

    @shaneeckert That sounds like it. I don’t know why you’d want to use AJAX add to cart and redirect to cart page together. It seems like one or the other would make more sense, and would most likely avoid the issue.

    MatthiasReinholz

    (@matthiasreinholz)

    @linux4me2 you are right, this is somewhat duplicate. But as far as I understand the AJAX add to cart setting only affects archive pages. Not sure if it does anything to the product pages.

    Nevertheless, disabling it does not resolve the issue.

    Plugin Support Shane Eckert

    (@shaneeckert)

    Automattic Happiness Engineer

    Hey @matthiasreinhol – so that’s not looking like the issue for you? Have you had a chance to duplicate your site and test just WooCommerce?

    linux4me2

    (@linux4me2)

    @matthiasreinholz You mentioned you’re using WP Super Cache. Make sure you delete the cache after disabling AJAX add to cart, log out and try it without logging in.

    MatthiasReinholz

    (@matthiasreinholz)

    @shaneeckert disabling the setting definitely does not have any effect and does not resolve the issue. But I am not sure if this is directly related to the bug you linked to?

    The bug is present on a fresh WordPress/WooCommerce installation without any other plugins/caching present. I tested it with multiple themes, including Twenty Nineteen.

    Plugin Author peterfabian1000

    (@peterfabian1000)

    Edit: sorry, that was probably a red herring. Please ignore.

    I’m not 100% sure, but could be also related to the issue we are seeing on the WP Engine where redirects end up crashing PHP: https://github.com/woocommerce/woocommerce/issues/23352

    @matthiasreinholz have you tried to _not_ use redirect on add to cart?

    softwareninjade

    (@softwareninjade)

    I see the (almost) exact same thing happening after updating to 3.6.0:
    1. Logged-in user: click on “add to cart” works
    2. Anonymous user: click on “add to cart” yields a blank page
    2.1. Repeating “add to cart” as an anonymous user still yields a blank page

    When activating WP_DEBUG I see this in the debug.log:
    PHP Fatal error: Call to a member function get() on null in /var/www/mysite.com/htdocs/wp-includes/cache.php on line 123

    I tried turning off plugins I suspected of causing trouble – to no avail.

    EDIT:
    I switched off + deleted caching (wp-super-cache) and that AJAX add to cart option as this was my prime suspect. Didn’t help.

    • This reply was modified 7 months ago by softwareninjade. Reason: Added info on turning off caching
    • This reply was modified 7 months ago by softwareninjade. Reason: AJAX add to cart option also turned off
    Plugin Author Timmy Crawford

    (@timmydcrawford)

    I’ve been able to consistently reproduce the add-to-cart bug, and have opened an issue that we are looking into now: https://github.com/woocommerce/woocommerce/issues/23353

    softwareninjade

    (@softwareninjade)

    Quick update from my side: my issue has been resolved by applying the fix I see in your commit.

    Great job, thanks, Timmy! 🙂

    Plugin Author Timmy Crawford

    (@timmydcrawford)

    Excellent, glad that worked for you @softwareninjade – and for anyone else on the thread who was having issues with add-to-cart – please check out the 3.6.1 release https://woocommerce.wordpress.com/2019/04/18/woocommerce-3-6-1-release/

    Plugin Support Dat Hoang

    (@htdat)

    Thanks Timmy and everyone involving here.

    This issue was fixed in 3.6.1 – https://woocommerce.wordpress.com/2019/04/18/woocommerce-3-6-1-release/

    I am marking this topic as resolved. Feel free to create a new topic if you have any other issues.

    Enrique J. Ros

    (@enriquejros)

    Updated to 3.6.1 and issue fixed, thank you!

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘add-to-cart link not working on 3.6.0 for not logged in users’ is closed to new replies.