Can't execute the UpdateOperation on cart

Topic summary

A developer encountered an error while attempting to update a cart line’s price using the UpdateOperation in a Shopify function extension.

Error Details:

  • The operation failed with: “Field is not defined on UpdateOperation”
  • Error path pointed to: [“operations”, 0, “update”, “price”]
  • Despite the error, the expected output appeared correctly in STDOUT

Resolution:

  • The issue was resolved by adding api_version = "unstable" to the shopify.extension.toml configuration file
  • This suggests the UpdateOperation feature or specific field support requires the unstable API version to function properly
Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

I was trying to update the price of a cartline using the UpdateOperation.
To do that I’ve created the app and the extension and deployed the app. App when I check the output(STDOUT) I see the result as expected but meanwhile I’m getting an error:

Input:

Error

[
  {
    "path": [
      "operations",
      0,
      "update",
      "price"
    ],
    "explanation": "Field is not defined on UpdateOperation"
  }
]

Can someone point out where the problem is? Thanks!

Its working after I’ve added the the following to shopify.extension.toml file

api_version = “unstable”

1 Like