Skip to content

Commit 2165d5d

Browse files
committed
fix: deal with custom .skip-open prefix on domain param also for kit discounts (!)
1 parent 89a4021 commit 2165d5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/lib/helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ const getValidDiscountRules = (discountRules, params, itemsForKit) => {
7474
return false
7575
}
7676
const isKitDiscount = Array.isArray(itemsForKit) &&
77-
(Array.isArray(rule.product_ids) || (Array.isArray(rule.category_ids)))
77+
(Array.isArray(rule.product_ids) || Array.isArray(rule.category_ids))
7878
if (rule.domain && rule.domain !== params.domain) {
7979
if (params.domain === `${rule.domain}.skip-open`) {
80-
if (isKitDiscount || checkOpenPromotion(rule)) return false
80+
if (!isKitDiscount && checkOpenPromotion(rule)) return false
8181
} else {
8282
return false
8383
}

0 commit comments

Comments
 (0)