less than a minute read • Updated 9 minutes ago
Set an expiration time for products in the cart
How to use the expires product attribute to automatically remove products from a customer's cart after a set time, and require it store-wide.
Use the expires product attribute to automatically remove a product from a customer’s cart if they don’t complete checkout before a set time — useful for making sure your quantity_max limits and inventory records stay accurate.
How to set it up
Notes
expiresis stripped from a product once it’s part of a subscription. Once a product with anexpiresvalue has been successfully paid for as part of a subscription, it persists on that subscription indefinitely.If you’re also using inventory locks (see Set up advanced inventory tracking with inventory locks), set your
expiresvalue to pass slightly before the corresponding lock expires in your own system. This avoids a gap where the product has left the cart but the lock hasn’t cleared yet, which could otherwise delay that stock becoming available again.