I’m facing an issue with my online store, which is built using Shopify’s headless solution with Hydrogen for the front-end and Shopify’s native checkout.
The problem I’m encountering is that after a user places an order and then returns to my store’s page, the shopping cart still contains the items from the previous order. Ideally, the cart should be cleared after an order is placed.
For the Storefront API in general, the cart will return null after a checkout is complete. If you’re fetching the cart on each page load (and not caching or storing), you should see null once the checkout completes.