For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hello,
We've noticed a bug with attempting to apply order metafields in Checkout UI Extensions.
Applying a metafield change during checkout where a metafield value is already present will result in a false positive result.
Here's a snippet of example code:
```
```
If `check_id` in this example is `bbbbbbb` for example, then you'd expect the result to be `bbbbbbb`. Yet, we're seeing this strange output from this code above:
```
Updated real_id.check_id metafield to : bbbbbbb
Result: aaaaaaa
```
It appears the `applyMetafieldsChange` doesn't actually properly update the metafield nor does it throw an error in this case when the update failed.
Is there a special flag that needs to be passed to "force" an update?
Want to see it in action? Check out our demo store.
I've also created a bug report on the Shopify UI Extensions Github Repository.
Here's a link to the issue: https://github.com/Shopify/ui-extensions/issues/1912
Want to see it in action? Check out our demo store.