• Resolved chloemccarty

    (@chloemccarty)


    Hi,

    I noticed that this plugin causes the ‘apply_coupon_nonce’ in woocommerce to be cached for logged out users.
    This means that logged out woocommerce users cannot apply coupons on the cart or checkout page. We’ve had to disable the plugin on our site due to this conflict and I wanted to make you aware of it, in case you’d like to plan a bug fix for it.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Raul P.

    (@alignak)

    Thanks for letting me know.

    I believe that as soon as the user adds something to the cart, it should bypass cache. Isn’t that happening for your site?

    Does it get cached even if the user has something in the cart?

    You can technically, disable the plugin for the cart page:
    https://www.ads-software.com/support/topic/disable-fvm-on-a-single-page/

    We already do that for the checkout page, but not for the cart.

    • This reply was modified 4 years, 6 months ago by Raul P..
    Thread Starter chloemccarty

    (@chloemccarty)

    Thanks for the advice, that did the trick! (I just hooked it into the ‘woocommerce_before_cart’ action)

    Yes, the nonce is cached even when the user has something in the cart. (The ‘apply_coupon_nonce’ is reset when you add something to the cart, but for some reason when you then go to do an action like add a coupon to your cart, you get a cached nonce which causes a 403 error on the /?wc-ajax=apply_coupon request meaning logged out users can’t use coupons.

    I determined that the ‘apply_coupon_nonce’ nonce for woo was getting cached for logged out users when I temporarily added some logging to woocommerce\includes\class-wc-frontend-scripts.php and wp-includes/pluggable.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin Prevents Logged out Woocommerce users from using Coupons’ is closed to new replies.