From 69a1de0db17bdbfa00ab468e9f2a392185eb4c5c Mon Sep 17 00:00:00 2001 From: Marc Schipperheyn Date: Wed, 18 Dec 2024 08:24:43 -0300 Subject: [PATCH] fix(core): Include variant custom fields when duplicating a product (#3203) --- .../src/config/entity/entity-duplicators/product-duplicator.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/config/entity/entity-duplicators/product-duplicator.ts b/packages/core/src/config/entity/entity-duplicators/product-duplicator.ts index 05dd197b47..f01f404415 100644 --- a/packages/core/src/config/entity/entity-duplicators/product-duplicator.ts +++ b/packages/core/src/config/entity/entity-duplicators/product-duplicator.ts @@ -182,6 +182,7 @@ export const productDuplicator = new EntityDuplicator({ return { languageCode: translation.languageCode, name: translation.name, + customFields: translation.customFields, }; }), optionIds: options.map(option => option.id), @@ -190,6 +191,7 @@ export const productDuplicator = new EntityDuplicator({ stockLocationId: stockLevel.stockLocationId, stockOnHand: stockLevel.stockOnHand, })), + customFields: variant.customFields, }; }); const duplicatedProductVariants = await productVariantService.create(ctx, variantInput);