access current order info in shopify post purchase extension

access current order info in shopify post purchase extension

gajenderdh947
Shopify Partner
12 0 1

Hi Devs .

 

I am trying to get current order data and print it to console  in shopify post purchase extension like this Please let me Know if its possible and if its possible how can i make it correct 

 

extend("Checkout::PostPurchase::ShouldRender", async ({ storage }) => {

console.log(JSON.stringify(Shopify));
const initialState = await getRenderData();
const render = true;

if (render) {

await storage.update(initialState);
}

return {
render,
};
});

Replies 0 (0)