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< Target extends RenderExtensionTarget = RenderExtensionTarget, >(): CartDiscountCode[] { const {discountCodes} = useApi<Target>(); return useSubscription(discountCodes); }
The code for the discount