From 018871f8cd6121ea6af40644f784256891b11849 Mon Sep 17 00:00:00 2001 From: Nicolas Gorga <62995075+NicolasGorga@users.noreply.github.com> Date: Tue, 4 Nov 2025 18:54:30 -0300 Subject: [PATCH] fix(medusa): priced products region_id regression (#13961) * Correctly destructure query result * Add changeset --- .changeset/few-shoes-worry.md | 5 +++++ .../utils/middlewares/products/normalize-data-for-context.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/few-shoes-worry.md diff --git a/.changeset/few-shoes-worry.md b/.changeset/few-shoes-worry.md new file mode 100644 index 0000000000..23e41cdaf3 --- /dev/null +++ b/.changeset/few-shoes-worry.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +Fix regression preventing region_id to be resolved from store's default region when retrieving priced products diff --git a/packages/medusa/src/api/utils/middlewares/products/normalize-data-for-context.ts b/packages/medusa/src/api/utils/middlewares/products/normalize-data-for-context.ts index f6efc29e9c..619ad414ac 100644 --- a/packages/medusa/src/api/utils/middlewares/products/normalize-data-for-context.ts +++ b/packages/medusa/src/api/utils/middlewares/products/normalize-data-for-context.ts @@ -77,7 +77,7 @@ export function normalizeDataForContext(options: PricingContextOptions = {}) { // Finally, try to get it from the store defaults if not available if (!regionId) { - const stores = await refetchEntities({ + const { data: stores } = await refetchEntities({ entity: "store", scope: req.scope, fields: ["id", "default_region_id"],