Skip to content

Commit 7fc54f9

Browse files
committed
Adjust formatting of checkUsageRestrictionsOnCreation function
1 parent 69d7dc8 commit 7fc54f9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,15 +393,15 @@ private extension AddEditCouponViewModel {
393393

394394
func checkUsageRestrictionsOnCreation(of coupon: Coupon) -> Bool {
395395
coupon.maximumAmount.isNotEmpty ||
396-
coupon.minimumAmount.isNotEmpty ||
397-
(coupon.usageLimit ?? 0) > 0 ||
398-
(coupon.usageLimitPerUser ?? 0) > 0 ||
399-
(coupon.limitUsageToXItems ?? 0) > 0 ||
400-
coupon.emailRestrictions.isNotEmpty ||
401-
coupon.individualUse ||
402-
coupon.excludeSaleItems ||
403-
coupon.excludedProductIds.isNotEmpty ||
404-
coupon.excludedProductCategories.isNotEmpty
396+
coupon.minimumAmount.isNotEmpty ||
397+
(coupon.usageLimit ?? 0) > 0 ||
398+
(coupon.usageLimitPerUser ?? 0) > 0 ||
399+
(coupon.limitUsageToXItems ?? 0) > 0 ||
400+
coupon.emailRestrictions.isNotEmpty ||
401+
coupon.individualUse ||
402+
coupon.excludeSaleItems ||
403+
coupon.excludedProductIds.isNotEmpty ||
404+
coupon.excludedProductCategories.isNotEmpty
405405
}
406406

407407
func checkUsageRestrictionsUpdated(for coupon: Coupon) -> Bool {

0 commit comments

Comments
 (0)