Check if the customer used a coupon code,

To check if the customer used a coupon code, you could use one of these examples:

 Customer.HasDiscountCouponCode("freeshipping")

 Customer.AppliedDiscountCouponCodes().Contains("freeshipping"))

 Customer.AppliedDiscountCouponCodes().Any()

Comments
Leave your comment
: