Skip to content

Commit

Permalink
feat(picqer): channels default translation first
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug committed Sep 26, 2024
1 parent 8491ffc commit e04c467
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/vendure-plugin-picqer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 3.3.1 (2024-09-26)

- Find channel's default translation for products when sending to Picqer.

# 3.3.0 (2024-09-17)

- Transition to `Shipped` state first (#504)
Expand Down
2 changes: 1 addition & 1 deletion packages/vendure-plugin-picqer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pinelab/vendure-plugin-picqer",
"version": "3.3.0",
"version": "3.3.1",
"description": "Vendure plugin syncing to orders and stock with Picqer",
"author": "Martijn van de Brug <[email protected]>",
"homepage": "https://pinelab-plugins.com/",
Expand Down
2 changes: 1 addition & 1 deletion packages/vendure-plugin-picqer/src/api/picqer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,10 +1107,10 @@ export class PicqerService implements OnApplicationBootstrap {
throw Error(`Variant with ID ${variant.id} has no SKU`);
}
let name: string =
variant.name ??
variant.translations?.find(
(t) => t.languageCode === ctx.channel.defaultLanguageCode
)?.name ??
variant.name ??
variant.translations?.[0]?.name;
if (!name) {
Logger.info(
Expand Down

0 comments on commit e04c467

Please sign in to comment.