Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Checkout UI Extension - save order metafield

Checkout UI Extension - save order metafield

sebastiandev
Shopify Partner
72 1 27

Hi,

I’m working with Checkout UI Extensions. I need to add a custom block on the "Thank you" page – the target is purchase.thank-you.block.render.


The addition works, but I'm having trouble saving additional order information in the metafield. I’m using:

 

 
const applyMetafieldChange = useApplyMetafieldsChange();


However, I'm getting an error in the console:

 

 
Cannot call 'applyMetafieldChange()' on target 'purchase.thank-you.block.render'. The corresponding property was not found on the API.


I don’t quite understand how I can save additional information in the metafield. Any hints?

Reply 1 (1)
sebastiandev
Shopify Partner
72 1 27

Thank you for your message. I don’t have a website URL; I only have a local version of a test app where I’m exploring the possibilities of the block.

 

Regarding the details, there will be just one input field where I want to save the entered data in the order details as a metafield. If there are any restrictions, I can save it elsewhere.

 

Everything is working except for saving to the order details itself. I’m not sure how to do that.

 

Could you help me with this?