Skip to content

Commit f2cec15

Browse files
fix: Always at least include the product title when the product mapping isn't configured
1 parent e172896 commit f2cec15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/services/Csv.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,11 @@ private function resolveProductExportMapping(Product $product): array
851851
$productMap[$i] = [$fieldHandle, $heading];
852852
}
853853

854+
$titleMap = collect($productMap)->filter(static fn ($mapping) => $mapping[1] === 'title')->first();
855+
if ($titleMap === null) {
856+
$productMap = array_merge([['title', 'title']], $productMap);
857+
}
858+
854859
return $productMap;
855860
}
856861
}

0 commit comments

Comments
 (0)