Lately I’m having these issues:
1/ from time to time this returns object with number = 0.
2/ no idea why, but sometimes i get object with cartId present and sometimes the cartId is undefined…
There is not much more to share, i use it like this:
$w('#thankYouPage1').getOrder()
.then((order) => {
order.number is sometimes ok, sometimes 0
order.cartId is sometimes ok, sometimes undefined
}
This is making me really crazy.
At this point I will try to reload the Thank you page if i get order.number = 0. And I had to completely rewrite the code to use order._id and not order.cartId, because lately it became unreliable.
wtf