Model
ValidateCouponCode
Magento\SalesRule\Model\ValidateCouponCode
What it does
This class validates coupon codes to determine if they can be applied to an order.
Developers use this when they need to verify multiple coupon codes, checking if each coupon exists, hasn't exceeded usage limits (global or per-customer), and ensuring only one coupon per rule is applied.
It returns an array of valid coupon codes indexed by their associated rule IDs.
Public Methods
- execute()