Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #252958

    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!

    #252976

    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!

    #253074

    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

    #253076

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.