File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
app/code/Magento/SalesRule/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2024 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
+
6
7
namespace Magento \SalesRule \Model \ResourceModel ;
7
8
8
9
use Magento \Framework \App \ObjectManager ;
@@ -187,7 +188,10 @@ protected function _afterSave(AbstractModel $object)
187
188
}
188
189
189
190
// Update auto geterated specific coupons if exists
190
- if ($ object ->getUseAutoGeneration () && $ object ->hasDataChanges ()) {
191
+ if (($ object ->getUseAutoGeneration ()
192
+ || ((int ) $ object ->getCouponType ()) === \Magento \SalesRule \Model \Rule::COUPON_TYPE_AUTO
193
+ ) && $ object ->hasDataChanges ()
194
+ ) {
191
195
$ this ->_resourceCoupon ->updateSpecificCoupons ($ object );
192
196
}
193
197
return parent ::_afterSave ($ object );
You can’t perform that action at this time.
0 commit comments