diff --git a/packages/medusa-plugin-brightpearl/.gitignore b/packages/medusa-plugin-brightpearl/.gitignore index a28122e219..702ac6c2fc 100644 --- a/packages/medusa-plugin-brightpearl/.gitignore +++ b/packages/medusa-plugin-brightpearl/.gitignore @@ -12,4 +12,5 @@ yarn.lock /services /models /subscribers +/utils diff --git a/packages/medusa-plugin-brightpearl/src/services/brightpearl.js b/packages/medusa-plugin-brightpearl/src/services/brightpearl.js index 5bff4dd5df..df7f545a43 100644 --- a/packages/medusa-plugin-brightpearl/src/services/brightpearl.js +++ b/packages/medusa-plugin-brightpearl/src/services/brightpearl.js @@ -576,6 +576,11 @@ class BrightpearlService extends BaseService { const goodsOut = await client.warehouses.retrieveGoodsOutNote(id) const order = await client.orders.retrieve(goodsOut.orderId) + // Only relevant for medusa orders check channel id + if (order.channelId !== parseInt(this.options.channel_id)) { + return + } + // Combine the line items that we are going to create a fulfillment for const lines = Object.keys(goodsOut.orderRows) .map((key) => {