Developer changelog

Subscribe to the changelog to stay up to date on recent changes to Shopify’s APIs and other developer products, as well as preview upcoming features and beta releases.

Get updates by RSS

Cart Line Items Now Ordered in Reverse Chronological Order Based on Time of Addition


As of API version 2023-10, we've made changes to the ordering of line items in the cart. In the past, newly added items were placed at the end of the cart without explicit sorting. Now, line items will be sorted in reverse order by the time they were added to the cart, meaning the most recently added items will be positioned at the top.

Developers, be aware that this change could affect the ordering of cart items in your applications. If your app or store's functionality relies on the order of line items or an item's position in the cart, this update is especially relevant to you.