The Checkout API no longer returns the amount of inventory remaining when a checkout is created or updated and there are not enough products in stock. This change was made to protect the privacy of our merchants.
To support older themes, the option
remaining: 1 is returned from the API. However, this number doesn't change, or represent the actual amount of inventory remaining. This option will be removed in a future version of the API.
Learn more about the updated error response by reading our Checkout API documentation on Shopify.dev.