The “woocommerce_thankyou” hook fires on the Thank You page once an order is placed. Most tracking functions like Google Analytics, affiliate commission plugins and other WooCommerce extensions rely on “woocommerce_thankyou” to run their code.
Problem is – “woocommerce_thankyou” is ALSO called if an order fails (i.e. payment did not go through). Now, unless the plugin is smart enough in its own functions to exclude failed orders, which doesn’t happen often I’m afraid, we need to find a way NOT to run “woocommerce_thankyou” if an order fails. Case study: a client uses a third party affiliate plugin, this plugin hooks into “woocommerce_thankyou“, but they don’t want to calculate conversions when an order fails.
So here you go! Continue reading WooCommerce: Disable Tracking if Order Failed @ Thank You Page
There is a slightly annoying thing on the WooCommerce Thank-You Page and WooCommerce emails. Users looking at the order table can actually click on the Products they just purchased and abandon the page before taking the action you want them to take (see image below).
So, I coded a simple PHP snippet to remove such links. As usual, 1 line of code is more than sufficient:) Continue reading WooCommerce: Remove Link to Product @ Order Table
How do you add a conversion tracking code to the WooCommerce Thank You Page? Well, with a simple snippet (and no plugin) you can!
No matter whether you’re using Google AdWords, Facebook or other forms of marketing – the Thank You Page is such an important section of an ecommerce store and needs some TLC! Continue reading WooCommerce: Add Conversion Tracking Code to Thank You Page
This is a very common customization request: how can you redirect customers to a beautifully looking, custom, product-specific thank you page?
Thankfully you can simply add some PHP code to your functions.php and redirect buyers to a custom URL. This is a great chance for you to add specific upsells, social media shares and other information that could help you convert additional sales. Continue reading WooCommerce: Redirect to Custom Thank you Page
A client of mine wanted to add some text to the thank you page, the page that customers see after they place an order on WooCommerce. In her case, she wanted to add a special offer in order to entice buyers to go back to the website and buy again. Continue reading WooCommerce: Add Content to the Thank You Page