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 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2024 Adobe
4+ * All Rights Reserved .
55 */
6+
67namespace Magento \SalesRule \Model \ResourceModel ;
78
89use Magento \Framework \App \ObjectManager ;
@@ -187,7 +188,10 @@ protected function _afterSave(AbstractModel $object)
187188 }
188189
189190 // 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+ ) {
191195 $ this ->_resourceCoupon ->updateSpecificCoupons ($ object );
192196 }
193197 return parent ::_afterSave ($ object );
You can’t perform that action at this time.
0 commit comments