Woocommerce thank you page

Variable $order in thankyou.php will be created by order key from URL. e.g. key=wc_order_593a3d1583f2e

So, it’s important to make sure return URLs of payment gateways include this param or thank you page won’t display order info and purchase event of Facebook pixel will not work neither.

Reference:

  1. How to get order key:
    https://stackoverflow.com/questions/37669956/woocommerce-get-order-key