WordPress action hook

woocommerce_before_thankyou

Defined by WooCommerce and fired by 44 plugins in total, running on 7.3M+ sites between them.

How to use woocommerce_before_thankyou

It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'woocommerce_before_thankyou', function( $arg1 ) {
	// Your code runs here.
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

44 plugins that fire woocommerce_before_thankyou

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/checkout/thankyou.php:28
  2. CartFlows icon CartFlows200,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) modules/thankyou/templates/instant-thankyou.php:32
  3. FunnelKit icon FunnelKit30,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) modules/thankyou-pages/class-wffn-thank-you-wc-pages.php:914
  4. SysBasics Customize My Account for WooCommerce icon SysBasics Customize My Account for WooCommerce7,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/myaccount/thankyou/01.php:355
  5. SellKit icon SellKit7,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/elementor/modules/order-details/templates/thankyou.php:31
  6. Donation Platform for WooCommerce: Fundraising & Donation Management icon Donation Platform for WooCommerce: Fundraising & Donation Management6,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/wc-templates/checkout/thankyou.php:30
  7. WPFunnels icon WPFunnels5,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) woocommerce/templates/checkout/thankyou.php:42
  8. WowStore icon WowStore4,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) blocks/woo/thank_you/order_conformation/Template.php:9
  9. CheckoutWC Lite icon CheckoutWC Lite2,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/Compatibility/Plugins/WooCommerceCore.php:121
  10. Frisbii Pay icon Frisbii Pay1,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/checkout/thankyou.php:53
  11. Openpay SPEI Plugin icon Openpay SPEI Plugin1,000+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/woocommerce/checkout/thankyou.php:26
  12. BORICA Payments by BORICA AD icon BORICA Payments by BORICA AD600+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/functions.php:4085
  13. Noah Shop Builder for WooCommerce icon Noah Shop Builder for WooCommerce300+ installs do_action( 'woocommerce_before_thankyou', $order_id ) includes/Templates/Types/OrderReceived.php:105
  14. FoodBook Lite icon FoodBook Lite300+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) template/woocommerce/checkout/thankyou.php:270
  15. Cargo Shipping Location for WooCommerce icon Cargo Shipping Location for WooCommerce200+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) woocommerce/templates/checkout/thankyou.php:26
  16. KiriminAja Official icon KiriminAja Official200+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/woocommerce/checkout/thankyou.php:28
  17. Swedbank Pay Payment Menu icon Swedbank Pay Payment Menu200+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/checkout/thankyou.php:26
  18. Shopready icon Shopready100+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) src/extension/elewidgets/widgets/thankyou/template-parts/quick_review/woo-ready-thankyou-order-preset-one.php:11
  19. Planet Pay payments icon Planet Pay payments100+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/checkout/thankyou.php:27
  20. RestroFood Lite icon RestroFood Lite100+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) template/woocommerce/checkout/thankyou.php:266
  21. ShopMaker icon ShopMaker90+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/widgets/checkout/thankyou.php:26
  22. Custom Thank you for Woo icon Custom Thank you for Woo10+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) checkout/thankyou.php:24
  23. TrafficFlow OnePageCheckout for WooCommerce icon TrafficFlow OnePageCheckout for WooCommerce10+ installs do_action( 'woocommerce_before_thankyou', $opcw_order->get_id() ) templates/page-thankyou.php:58
  24. WowRestro icon WowRestro10+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/views/order-received.php:24
  25. Split Order by category for Woocommerce icon Split Order by category for Woocommerce10+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) include/checkout/thankyou.php:22
  26. Split Order on checkout pro for Woocommerce icon Split Order on checkout pro for Woocommerce10+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) inc/checkout/thankyou.php:43
  27. Pravel Rent & Sell Addon for WooCommerce icon Pravel Rent & Sell Addon for WooCommerce10+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) woocommerce/checkout/thankyou.php:25
  28. wcOne icon wcOne10+ installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) template/woocommerce/checkout/thankyou.php:270
  29. IPS Cart&Checkout for WooCommerce icon IPS Cart&Checkout for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/classes/Front/Thankyou/ThankyouSlotRenderer.php:25
  30. Cryptochain icon CryptochainFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) template/woocommerce/checkout/thankyou.php:43
  31. Cresta Checkout for WooCommerce icon Cresta Checkout for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $id ) inc/class-cbc-order.php:114
  32. Split Order By Warehouse for Woocommerce icon Split Order By Warehouse for WoocommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) include/checkout/thankyou.php:25
  33. Split order by weight for WooCommerce icon Split order by weight for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) inc/checkout/thankyou.php:13
  34. Split Backorder for Woocommerce icon Split Backorder for WoocommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) include/checkout/thankyou.php:22
  35. PaymentIQ Checkout icon PaymentIQ CheckoutFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/Checkout/paymentiq-order-received.php:29
  36. Web22 Checkout icon Web22 CheckoutFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/checkout/thankyou.php:18
  37. MCOD Minimalist Checkout for WooCommerce icon MCOD Minimalist Checkout for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/woocommerce/checkout/thankyou.php:56
  38. SuperPlus icon SuperPlusFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/modules/checkout-steps/templates/woocommerce/checkout/thankyou.php:10
  39. Novatum Payment Gateway for WooCommerce icon Novatum Payment Gateway for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/novatum-success-page-template.php:49
  40. Aiolos Checkout for WooCommerce icon Aiolos Checkout for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/checkout/thankyou.php:19
  41. Platecraft Addons for Elementor icon Platecraft Addons for ElementorFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) includes/widgets/class-thank-you.php:594
  42. ithan devvn checkout for woocommerce icon ithan devvn checkout for woocommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) templates/checkout/thankyou.php:14
  43. Splitter Orders For Woocommerce icon Splitter Orders For WoocommerceFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) inc/checkout/thankyou.php:43
  44. Dustid Integration Kit icon Dustid Integration KitFewer than 10 installs do_action( 'woocommerce_before_thankyou', $order->get_id() ) public/template/woocommerce/checkout/thankyou.php:26

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.