Model
CouponManagement
Magento\Quote\Model\CouponManagement
What it does
This class manages coupon codes for shopping carts in Magento 2.
Developers use it to apply, retrieve, or remove discount coupons from a customer's quote/cart programmatically.
It handles validation, ensures the cart has products, and recalculates totals after coupon operations.
Public Methods
- get()
- set()
- remove()