Model
GetCouponCodeLength
Magento\SalesRule\Model\Quote\GetCouponCodeLength
What it does
This class calculates the required length for auto-generated coupon codes in Magento 2.
Developers use it when programmatically creating coupon codes to ensure they meet the configured length requirements, taking into account factors like prefix, suffix, and dash spacing that affect the final code length.
Public Methods
- fetchCouponCodeLength()