Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi there ~
I am using Cart API for building shopping cart for the Hydrogen App. I'm wondering when does the cart session expire? Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi ChloeWu_EMW3,
Unused and abandoned carts automatically expire within 10 days of creation - you can learn more about working with the cart for custom storefronts in our dev docs here.
Hope this helps,
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hi ChloeWu_EMW3,
Unused and abandoned carts automatically expire within 10 days of creation - you can learn more about working with the cart for custom storefronts in our dev docs here.
Hope this helps,
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thank you for your response!
What happens if on the client, you try to add/remove an item from this expired cart ID? Will the mutation just fail? Or will a new cart with a new ID be created but with the same items as the old one?
Or if you try to query for an expired cart, will it just return null?
Thanks!