File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
app/code/Magento/SalesRule/Observer Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 99
1010use Magento \Framework \Event \Observer ;
1111use Magento \Framework \Event \ObserverInterface ;
12- use Magento \Multicoupon \Model \Config \Config ;
1312
1413/**
1514 * Class for process order for resetting shipping flag.
1615 */
1716class ProcessOrderCreationDataObserver implements ObserverInterface
1817{
19- /**
20- * @param Config $multiCouponConfig
21- */
22- public function __construct (private Config $ multiCouponConfig )
23- {
24- }
25-
2618 /**
2719 * Checking shipping method and resetting it if needed.
2820 *
@@ -38,8 +30,7 @@ public function execute(Observer $observer)
3830 $ isVirtualQuote = $ quote ->isVirtual ();
3931 $ quoteShippingMethod = $ observer ->getEvent ()->getShippingMethod ();
4032 $ checkIfCouponExists = array_key_exists ('coupon ' , $ request ['order ' ]);
41- $ noOfCouponsAvailable = $ this ->multiCouponConfig ->getMaximumNumberOfCoupons ();
42- if (!$ isVirtualQuote && !empty ($ quoteShippingMethod ) && $ checkIfCouponExists && $ noOfCouponsAvailable <= 1 ) {
33+ if (!$ isVirtualQuote && !empty ($ quoteShippingMethod ) && $ checkIfCouponExists ) {
4334 $ shippingAddress = $ quote ->getShippingAddress ();
4435 $ shippingAddress ->setShippingMethod ($ quoteShippingMethod );
4536 }
You can’t perform that action at this time.
0 commit comments