Skip to content

Commit 0cb1202

Browse files
authored
fix(core-flows): Add discountable properties in queried fields to avoid overriding discountable properties when set (medusajs#14105)
* Add discountable properties to avoid applying adjustments to non discountable line items * Add changeset
1 parent 79582bc commit 0cb1202

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/rare-symbols-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/core-flows": patch
3+
---
4+
5+
fix(core-flows): Add discountable properties in queried fields to avoid overriding discountable properties when set

packages/core/core-flows/src/order/utils/fields.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const productVariantsFields = [
44
"sku",
55
"manage_inventory",
66
"allow_backorder",
7+
"is_discountable",
78
"barcode",
89
"product.id",
910
"product.title",
@@ -15,6 +16,7 @@ export const productVariantsFields = [
1516
"product.type.id",
1617
"product.collection.title",
1718
"product.handle",
19+
"product.discountable",
1820
"inventory_items.inventory_item_id",
1921
"inventory_items.required_quantity",
2022
"inventory_items.inventory.requires_shipping",

0 commit comments

Comments
 (0)