Hi @speedlife
Variables can be added to WordPress pages by various means, but the data you’re looking for is not immediately available in the thankyou.php page without some custom coding.
Specifically, the woocommerce_thankyou
action provides a means of adding the information you are looking for to the page as a JavaScript variable, so that it can be picked up by your script.
An rough example is shown in the documentation here.
This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.
You can also visit the WooCommerce Facebook group or the #developers
channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.