diff --git a/src/QUI/ERP/Coupons/Events.php b/src/QUI/ERP/Coupons/Events.php index 1b76e7fa2be9ee7822af1869162abf91bac62a5c..0763a7a3610c998fae139568bfc60b06c2ee5053 100644 --- a/src/QUI/ERP/Coupons/Events.php +++ b/src/QUI/ERP/Coupons/Events.php @@ -360,6 +360,10 @@ protected static function addSessionCouponsToOrder($Order, $coupons) */ protected static function addCouponToOrder($Order, $coupon) { + if (!($Order instanceof QUI\ERP\Order\OrderInProcess)) { + return; + } + try { $code = Handler::sanitizeCode($coupon);