--- title: The Storefront API's Cart object now exposes warnings for non-applicable discount codes - Shopify developer changelog description: Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: https://shopify.dev/changelog/add-warnings-for-discount-codes md: https://shopify.dev/changelog/add-warnings-for-discount-codes.md --- [Back to Developer changelog](https://shopify.dev/changelog) May 22, 2025 Tags: * Storefront GraphQL API * 2025-07 # The Storefront API's Cart object now exposes warnings for non-applicable discount codes As of version 2025-07 of the GraphQL Storefront API, the `Cart` object now provides detailed warnings for non-applicable [`CartDiscountCodes`](https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountCode). Previously, when a discount code could not be applied, the `CartDiscountCode` was returned with `applicable: false`, and no additional details. This lack of information made it difficult for developers to provide helpful feedback to buyers. With the introduction of the new [`CartWarning`](https://shopify.dev/docs/api/storefront/2025-07/objects/CartWarning) types, you can now clearly identify the specific reasons why a discount code isn't applicable.