[BUG] unitPriceMeasurement updates do not always display in admin

Hello,

I’m trying out API version 2025-07 to update the unitPriceMeasurement field (which is great, thank you!) but I’m running into an issue with how the data looks in the admin.

If I update unitPriceMeasurement and there’s no previous unit price set for the variant the following happens:

  • The new value displays correctly in the API
  • I do not see the new value on the variant detail page
  • I do see the new value if I open up the modal to edit the unit price

This makes it confusing for merchants because it seems like the value isn’t set when, according to the API, it is.

If however, I update the unitPriceMeasurement for a variant that already has had the unit price configured in the admin, the calculated unit price shows up correctly.

I’ve tested this single-variant products and products with multiple variants and I’m seeing the same thing.

Here’s some debug info:

GraphQL variables:

{
    "productId": "gid://shopify/Product/10529604895023",
    "variants": [
        {
            "id": "gid://shopify/ProductVariant/51114789503279",
            "unitPriceMeasurement": {
                "quantityUnit": "G",
                "quantityValue": 200.0,
                "referenceUnit": "KG",
                "referenceValue": 1
            }
        }
    ]
}

GraphQL mutation (API version 2025-07):

mutation productVariantsBulkUpdate(
  $productId: ID!
  $variants: [ProductVariantsBulkInput!]!
) {
  productVariantsBulkUpdate(productId: $productId, variants: $variants) {
    product {
      id
      legacyResourceId
    }
    productVariants {
      id
      legacyResourceId
      title
      price
      compareAtPrice
      barcode
      sku
      taxable
      taxCode
      position
      inventoryPolicy
      inventoryQuantity
      createdAt
      updatedAt
    }
    userErrors {
      field
      message
    }
  }
}

x-request-id

9912db34-e5f9-495c-978b-edbfe41961cb-1747930687

Thanks!

Daniel

1 Like

Hey @Daniel_Ablestar,

Thanks for reporting this. To make sure I understand this properly, the data itself is applied correctly, however the admin UI (outside of the modal) does not update, and instead shows the previous value?

Thanks @KyleG-Shopify for taking a look.

Yes, the value is set correctly in the API, and it shows correctly if you open up the modal to configure it. It doesn’t always seem to show correctly on the variant detail page though (in other words + Add unit price appears even though a value is configured).

This happens when the variant does not have a preivously-configured unit price. Eg, if you create a new product then run a productVariantsBulkUpdate to set the unit price

Thanks for clarifying that.

I was able to replicate that on my end as well. I’ll dig in further and let you know what I find out.

1 Like

Hey Daniel. I have an update for you. Including showUnitPrice in your mutation will result in this showing in the admin. I’ve confirmed in my testing. If you see different let me know.

As for the admin UI, the team is working on improvements!

Ah, that did it! I should’ve seen the showUnitPrice field, thanks for the help!

1 Like