Hey everyone, I’m hitting an issue when trying to fetch items.variant.calculated_price for my orders via the Store API.
https://github.com/medusajs/nextjs-starter-medusa/blob/main/src/lib/data/orders.ts
// src/lib/data/orders.ts return sdk.client.fetch<HttpTypes.StoreOrderListResponse>(/store/orders, { method: "GET", query: { limit, offset, order: "-created_at", fields: "*items.variant.calculated_price,*items,+items.metadata,*items.variant,*items.product", ...filters, }, headers, next, cache: "force-cache", }) .then(({ orders }) => orders) .catch((err) => medusaError(err))
I’m getting this error:
Error setting up the request: Method calculatePrices requires currency_code in the pricing context
What’s the recommended way to pass currency_code (and/or region_id) when using the JS-SDK’s .fetch() call so that calculated_price can be returned successfully?
Thanks in advance! 🙏