ThankYouPage API Released

new features was released
i waiting this feature for this some time
now its released BUT its not working for me :frowning:
when i added this row on the Thank you page:
$w(‘#thankYouPage1’).getOrder();
i get the following error from the code editor:
“‘getOrder’ does not exist on #thankYouPage1

can some one test it and confirm if its a bug or i missed some thing there?
Thanks

You are referring to this here.
https://www.wix.com/corvid/reference/$w.ThankYouPage.html

Sp remember that this is connected to Wix Stores and that when you use getOrder()
https://www.wix.com/corvid/reference/$w.ThankYouPage.html#getOrder

That it is referring to the Thank You page in Wix Stores and you need to use the code as it is in the example and rename the thank you page as your own thank you page url as shown here.
https://support.wix.com/en/article/accessing-your-thank-you-page-url-in-wix-stores

Notes:
The Thank You page displays your customer’s order number, the order amount and the shipping address. More complete information is sent to your customer in the confirmation email .

"'getOrder' does not exist on #thankYouPage1"

As there is no order on that page that it can get.

as i understand from here:
https://www.wix.com/corvid/reference/$w.ThankYouPage.html#getOrder
getOrder()
Gets the order associated with the current page.
Description:
The getOrder() function returns a Promise that is resolved when the information about the order associated with the ThankYouPage is retrieved.

when i’m using this code on the Thank You Page:

$w('#myThankYouPage').getOrder()
  .then( (order) => {
    let orderNumber = order.number;
    let billingEmail = order.billingInfo.email;
    // see example order object below
  } )

i need to get this result:

/*
 * Example order object:
 *
 * {
 *   "_id": "d3e84af3-4597-9a18-36c8-1c6f176c0f52",
 *   "billingInfo": {
 *     "address": {
 *       "formatted": "235 W 23rd St, New York, NY 10011, USA",
 *       "city": "New York",
 *       "country": "USA",
 *       "addressLine": "235 W 23rd St",
 *       "postalCode": "10011"
 *     
 and more...


try it and see if you get this error on the Element with getOrder()