Tagged: custom tracking code, enfold woocommerce
Greetings,
We need to add to custom tracking code to our Enfold Woocommerce Checkout Thank You Page and the developers said they could not locate it in the themes.php. We need to add the code below this line in the appropriate file:
do_action( ‘woocommerce_thankyou’, $order->id );
Where can we find this? I am a novice user so please be specific. Thank you very much for your help!
PS – we did search for woocommerce / templates / checkout / thankyou.php but we could not find it or anything similar and we were told it was because of how the theme is set up. Please help!
Thanks!
Hey!
We use the default WooCommerce templates (cart, checkout, etc.). We also load the default /woocommerce/templates/checkout/thankyou.php template which already contains the code you mention in your post.
<?php do_action( 'woocommerce_thankyou_' . $order->payment_method, $order->id ); ?>
<?php do_action( 'woocommerce_thankyou', $order->id ); ?>
Best regards,
Peter
Hey!
Btw – you can probably use the woocommerce_thankyou hook to add your code to the page. There’s no need to manipulate the file directly in most cases.
Best regards,
Peter