Skip to content

Discount code warnings persist on cart object after cart updates (iOS SDK 2025-07) #1295

Description

@ali-ozden

I'm using Shopify Mobile Buy SDK for iOS (version 2025-07).
When a discount code is applied to the cart and that code is not applicable, the cart correctly returns a warning (e.g., DISCOUNT_NOT_FOUND, DISCOUNT_CUSTOMER_NOT_ELIGIBLE, etc.).

However, after this point, if I update the cart using any of the following mutations:

cartLinesAdd
cartLinesUpdate
cartLinesRemove

…the same discount-related warning continues to appear on the updated cart object — even though the user’s latest action has nothing to do with discount codes.

In our app, we show popups for warnings returned from cart queries, mutations (e.g.,
MERCHANDISE_NOT_ENOUGH_STOCK, MERCHANDISE_OUT_OF_STOCK, etc.) so users can see relevant feedback about their actions.

Because these discount warnings persist across cart updates, users are seeing irrelevant discount-related error popups (like DISCOUNT_NOT_FOUND) when performing unrelated actions such as adding or updating products in the cart.

Is this the expected behavior — that discount-related warnings persist across subsequent cart updates?
If so, what is the recommended way to clear or ignore these warnings, so that only those related to the user’s latest action are displayed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions