Adding notes to order in checkout ui extension

Solved
dev_dnShop
Shopify Partner
22 1 0

Hi,
I have been working on a task that basically is to when an order is submitted then add some notes to orders based on the logic in the extension.
I have read the docs and found that there is a hook named 

useApplyNoteChange()
can we use this to add notes from checkout using the checkout ui extension? I have tried using it but it didn't add the notes with order. below is the snippet I am using to achieve this.
if (our logic) {
setNotes({
type: "updateNote",
value:`there comes the note`,
});
}

Any help in this regard would be highly appreciated.
Thanks.
Accepted Solution (1)
dev_dnShop
Shopify Partner
22 1 0

This is an accepted solution.

if (our logic) {
setNotes({
type: "updateNote",
note:`there comes the note`,
});
}

This was resolved by setting the value to note in the object passed. A slight overlook on my side.

View solution in original post

Replies 2 (2)
dev_dnShop
Shopify Partner
22 1 0

anybody ??

 

dev_dnShop
Shopify Partner
22 1 0

This is an accepted solution.

if (our logic) {
setNotes({
type: "updateNote",
note:`there comes the note`,
});
}

This was resolved by setting the value to note in the object passed. A slight overlook on my side.