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:
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.
-
WooCommerce7+ million installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/checkout/thankyou.php:28 -
CartFlows200,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )modules/thankyou/templates/instant-thankyou.php:32 -
FunnelKit30,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )modules/thankyou-pages/class-wffn-thank-you-wc-pages.php:914 -
SysBasics Customize My Account for WooCommerce7,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/myaccount/thankyou/01.php:355 -
SellKit7,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/elementor/modules/order-details/templates/thankyou.php:31 -
Donation Platform for WooCommerce: Fundraising & Donation Management6,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/wc-templates/checkout/thankyou.php:30 -
WPFunnels5,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )woocommerce/templates/checkout/thankyou.php:42 -
WowStore4,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )blocks/woo/thank_you/order_conformation/Template.php:9 -
CheckoutWC Lite2,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/Compatibility/Plugins/WooCommerceCore.php:121 -
Frisbii Pay1,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/checkout/thankyou.php:53 -
Openpay SPEI Plugin1,000+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/woocommerce/checkout/thankyou.php:26 -
BORICA Payments by BORICA AD600+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/functions.php:4085 -
Noah Shop Builder for WooCommerce300+ installs
do_action( 'woocommerce_before_thankyou', $order_id )includes/Templates/Types/OrderReceived.php:105 -
FoodBook Lite300+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )template/woocommerce/checkout/thankyou.php:270 -
Cargo Shipping Location for WooCommerce200+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )woocommerce/templates/checkout/thankyou.php:26 -
KiriminAja Official200+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/woocommerce/checkout/thankyou.php:28 -
Swedbank Pay Payment Menu200+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/checkout/thankyou.php:26 -
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 -
Planet Pay payments100+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/checkout/thankyou.php:27 -
RestroFood Lite100+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )template/woocommerce/checkout/thankyou.php:266 -
ShopMaker90+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/widgets/checkout/thankyou.php:26 -
Custom Thank you for Woo10+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )checkout/thankyou.php:24 -
TrafficFlow OnePageCheckout for WooCommerce10+ installs
do_action( 'woocommerce_before_thankyou', $opcw_order->get_id() )templates/page-thankyou.php:58 -
WowRestro10+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/views/order-received.php:24 -
Split Order by category for Woocommerce10+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )include/checkout/thankyou.php:22 -
Split Order on checkout pro for Woocommerce10+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )inc/checkout/thankyou.php:43 -
Pravel Rent & Sell Addon for WooCommerce10+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )woocommerce/checkout/thankyou.php:25 -
wcOne10+ installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )template/woocommerce/checkout/thankyou.php:270 -
IPS Cart&Checkout for WooCommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/classes/Front/Thankyou/ThankyouSlotRenderer.php:25 -
CryptochainFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )template/woocommerce/checkout/thankyou.php:43 -
Cresta Checkout for WooCommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $id )inc/class-cbc-order.php:114 -
Split Order By Warehouse for WoocommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )include/checkout/thankyou.php:25 -
Split order by weight for WooCommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )inc/checkout/thankyou.php:13 -
Split Backorder for WoocommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )include/checkout/thankyou.php:22 -
PaymentIQ CheckoutFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/Checkout/paymentiq-order-received.php:29 -
Web22 CheckoutFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/checkout/thankyou.php:18 -
MCOD Minimalist Checkout for WooCommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/woocommerce/checkout/thankyou.php:56 -
SuperPlusFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/modules/checkout-steps/templates/woocommerce/checkout/thankyou.php:10 -
Novatum Payment Gateway for WooCommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/novatum-success-page-template.php:49 -
Aiolos Checkout for WooCommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/checkout/thankyou.php:19 -
Platecraft Addons for ElementorFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )includes/widgets/class-thank-you.php:594 -
ithan devvn checkout for woocommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )templates/checkout/thankyou.php:14 -
Splitter Orders For WoocommerceFewer than 10 installs
do_action( 'woocommerce_before_thankyou', $order->get_id() )inc/checkout/thankyou.php:43 -
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.