Replies: 0
Hello, dear woocommerce support!
Sorry about bothering you, I have some issue with checkout page for not logged in users. It always redirects the user to the cart page. On the link page with which I need help, you can see it. Also, in the network tab, it returns 302 http code.
But it works correctly and showing checkout page for logged-in user(me as admin).
Here is some setting from woocommerce product tab http://prntscr.com/tdnnyh. Also, orders allowed for users without account http://prntscr.com/tdno8s.
If it helps, I have no any extra plugins, and the theme was developed from scratch by me.
And on the checkout page I created I display the woocommerce checkout with the shortcode. Here how it looks http://prntscr.com/tdnpom.
I tried to switch to default page, removed some code from my checkout template – but the result is always the same, if I’m not logged in, I am redirected to the cart on checkout.
I also tried hooks to redirect user to the checkout page and skip cart(woocommerce_add_to_cart_redirect). But also without any result.
Maybe I missed smth? Can you please help or adjust me something?
Thanks in advance!
UPD: what I just noticed, that if I’ll go to the checkout url with add-to-cart parameter, it does not redirect to the cart page, and works correctly. So, may this issue appear with an empty cart? If so, how can I prevent it?
On the code of the checkout page template I am adding some items to cart by WC()->cart->add_to_cart($product_id)
, but it seems that it does not run the code, and redirect before page load.
-
This topic was modified 7 hours, 6 minutes ago by ahordii.
-
This topic was modified 6 hours, 59 minutes ago by ahordii.
-
This topic was modified 6 hours, 58 minutes ago by ahordii.