Get Failed Coupon/Gift Card In Checkout UI Extension

const applyDiscountCodeChange = useApplyDiscountCodeChange(); const applyGiftCardChange = useApplyGiftCardChange(); const listAppliedDiscountList = useDiscountCodes(); const listAppliedGiftCards = useAppliedGiftCards(); By using these hooks I can apply or remove coupons/gift cards and also able to get the list of applied gift cards(But this happens only for custom text box and custom button not with default text and button). I requirement is that when ever user types anything in the Shopify default text of reduce(gift/copuon card) and clicks on apply then in the error condition I want to get the failed code because I want to call an API there. const applyDiscountCodeChange = useApplyDiscountCodeChange(); const applyGiftCardChange = useApplyGiftCardChange(); const listAppliedDiscountList = useDiscountCodes(); const listAppliedGiftCards = useAppliedGiftCards(); By using these hooks I can apply or remove coupons/gift cards and also able to get the list of applied gift cards(But this happens only for custom text box and custom button not with default text and button).

Comment (0)

You’ll be in good company