fix(core-flows): line item type collection (#9251)

This commit is contained in:
Carlos R. L. Rodrigues
2024-09-24 05:00:18 -03:00
committed by GitHub
parent 657a9fb90b
commit e54b339324
3 changed files with 6 additions and 9 deletions

View File

@@ -108,8 +108,8 @@ export const productVariantsFields = [
"product.description",
"product.subtitle",
"product.thumbnail",
"product.type",
"product.collection",
"product.type.value",
"product.collection.title",
"product.handle",
"product.discountable",
"calculated_price.calculated_amount",

View File

@@ -46,12 +46,9 @@ export function prepareLineItemData(data: Input) {
product_description:
variant.product.description ?? item?.product_description,
product_subtitle: variant.product.subtitle ?? item?.product_subtitle,
product_type:
variant.product.type?.[0]?.value ?? item?.product_type ?? null,
product_type: variant.product.type?.value ?? item?.product_type ?? null,
product_collection:
variant.product.collection?.[0]?.value ??
item?.product_collection ??
null,
variant.product.collection?.title ?? item?.product_collection ?? null,
product_handle: variant.product.handle ?? item?.product_handle,
variant_id: variant.id,

View File

@@ -10,8 +10,8 @@ export const productVariantsFields = [
"product.description",
"product.subtitle",
"product.thumbnail",
"product.type",
"product.collection",
"product.type.value",
"product.collection.title",
"product.handle",
"calculated_price.calculated_amount",
"inventory_items.inventory_item_id",