public function fromQuote(int $quoteId): ?string
class GetCouponFromOrder
Often needed for order export, invoices, or customer history pages. magento 2 get coupon code programmatically