Skip to content

Commit 790bb10

Browse files
committed
Generate a random coupon code upfront when creating a new coupon
1 parent ab9f313 commit 790bb10

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WooCommerce/Classes/ViewRelated/Coupons/Add and Edit Coupons/AddEditCouponViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ final class AddEditCouponViewModel: ObservableObject {
209209
couponRestrictionsViewModel = CouponRestrictionsViewModel(siteID: siteID)
210210
productOrVariationIDs = []
211211
categoryIDs = []
212+
generateRandomCouponCode()
212213
}
213214

214215
/// Init method for coupon editing

0 commit comments

Comments
 (0)