Returns the current discount codes applied to the cart, and automatically re-renders your component if discount codes are added or removed.
Returns the current discount codes applied to the cart, and automatically re-renders your component if discount codes are added or removed.
export function useDiscountCodes< ID extends RenderExtensionPoint = RenderExtensionPoint, >(): CartDiscountCode[] { const {discountCodes} = useApi<ID>(); return useSubscription(discountCodes); }
The code for the discount