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?
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?