How could I get order total value of finished woocommerce order into my converse code?
The following code is bellow. I have tried everything and still getting fatal error. The code is located in functions.php in my theme.
add_action( 'woocommerce_thankyou', 'bbloomer_conversion_tracking_thank_you_page' );
function bbloomer_conversion_tracking_thank_you_page() {
?>
<!-- Mìøicí kód Sklik.cz -->
<script type="text/javascript">
var seznam_cId = 100060787;
var seznam_value = null;
</script>
<script type="text/javascript" src="https://www.seznam.cz/rs/static/rc.js" async></script>
<?php
}
I need to modify – > var seznam_value = null; to get the value – price (how much money does the order costs) of finished order to manage conversions on my website.
Thank you for your help!
2
Answers
This did the thing