-
-
Couldn't load subscription status.
- Fork 142
Description
Describe the bug
I believe there is a logic flaw in the WC_Order Root Query when trying to access an order as a guest. The suspect line is this one.
To my knowledge and according to the docs, the function get_current_user_id() will always return 0 when not logged in, making viewing an order as a guest impossible.
I am new to this plugin, so I may be missing some knowledge. However, since I am taking this theme (WooNuxt) as a starting point and since it is also failing to allow me to see my order as a guest, I believe this might be a bug:
To Reproduce
Steps to reproduce the behavior:
- Go to WooNuxt
- Add a product to your cart
- Checkout (as a guest)
- You will be redirected to the thankyou page, but you will encounter the aforementioned error message:
Not authorized to access this order.
Expected behavior
I am expecting to be able to see an order as a guest right after I place one.
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Brave
- Version: 1.77.97 Chromium: 135.0.7049.84 (Official Build) (64-bit)
Plugin Versions
- WooGraphQL Version: 0.21.0
- WPGraphQL Version: 2.1.1
- WordPress Version: 6.8
- WooCommerce Version: 9.8.1
Let me know if I am missing something 🙂
