Skip to content

Commit

Permalink
Merge pull request reactioncommerce#304 from sportsdirect/nnnnat-dail…
Browse files Browse the repository at this point in the history
…y-update-apr-26

Nat daily update apr 26
  • Loading branch information
chrisbalchin committed Apr 26, 2019
2 parents b955b1b + e414296 commit 8005895
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,11 @@ export default async function createCatalogProduct(product, context) {
const catalogProduct = await xformProduct({ collections, product, shop, variants });

// Apply custom transformations from plugins.
getFunctionsOfType("publishProductToCatalog").forEach((customPublishFunc) => {
for (const customPublishFn of getFunctionsOfType("publishProductToCatalog")) {
// Functions of type "publishProductToCatalog" are expected to mutate the provided catalogProduct.
customPublishFunc(catalogProduct, { context, product, shop, variants });
});
// eslint-disable-next-line no-await-in-loop
await customPublishFn(catalogProduct, { context, product, shop, variants });
}

return catalogProduct;
}

0 comments on commit 8005895

Please sign in to comment.