Model
ValidateCoupon
Magento\SalesRule\Model\ValidateCoupon
What it does
This class validates coupon codes for shopping cart price rules in Magento 2.
Developers use it to verify if a coupon is valid by checking its existence, usage limits (both overall and per customer), and whether it can be applied to a specific quote address.
It's typically invoked during checkout or cart operations when a customer applies a discount coupon.
Public Methods
- execute()