Add to cart breaks for guests with cache
-
The issues is that when you are a guest and click “add to cart” for a course, it doesn’t work if the page is cached. This is because of the nonce, already used.
To replicate the issue:
1. Enable guest checkout in STM LMS Settings
2. Enable cache on the site (every plugin will work)
3. Go on a course page as guest and click add to cart (it will work, using the nonce)
4. Now close everything and re-open an anonymous tab as guest, then click again add to cart for the same course. This time it will not work, the ajax reply is -1 because of:check_ajax_referer(‘stm_lms_add_to_cart_guest’, ‘nonce’);
Which is into the STM_LMS_Guest_Checkout::guest_checkout_process controller hooked to wp_ajax_nopriv_stm_lms_add_to_cart_guest.
- The topic ‘Add to cart breaks for guests with cache’ is closed to new replies.