fix(medusa-plugin-brightpearl): External ref split (#4295)
* order should be first part of external_ref * add changeset --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
5
.changeset/weak-waves-watch.md
Normal file
5
.changeset/weak-waves-watch.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"medusa-plugin-brightpearl": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(brightpearl): split externalRef to get product id
|
||||||
@@ -1705,7 +1705,7 @@ class BrightpearlService extends BaseService {
|
|||||||
const { fulfillments: existingFulfillments, sales_channel } =
|
const { fulfillments: existingFulfillments, sales_channel } =
|
||||||
await this.orderService_
|
await this.orderService_
|
||||||
.withTransaction(transactionManager)
|
.withTransaction(transactionManager)
|
||||||
.retrieve(order.externalRef, {
|
.retrieve(order.externalRef.split(".")[0], {
|
||||||
relations: ["fulfillments", "sales_channel"],
|
relations: ["fulfillments", "sales_channel"],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user