WordPress action hook
woocommerce_pay_order_before_submit
Defined by WooCommerce and fired by 14 plugins in total, running on 7.2M+ sites between them.
How to use woocommerce_pay_order_before_submit
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'woocommerce_pay_order_before_submit', function() {
// 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.
14 plugins that fire woocommerce_pay_order_before_submit
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_pay_order_before_submit' )templates/checkout/form-pay.php:100 -
CartFlows200,000+ installs
do_action( 'woocommerce_pay_order_before_submit' )woocommerce/template/checkout/form-pay.php:101 -
FunnelKit30,000+ installs
do_action( 'woocommerce_pay_order_before_submit' )modules/checkouts/public/template-common/form-order-pay.php:217 -
Payment Plugins Braintree For WooCommerce2,000+ installs
do_action( 'woocommerce_pay_order_before_submit' )templates/checkout/subscription-form-pay.php:99 -
Deposits & Partial Payments for WooCommerce1,000+ installs
do_action( 'woocommerce_pay_order_before_submit' )templates/checkout/form-pay.php:93 -
KiriminAja Official200+ installs
do_action( 'woocommerce_pay_order_before_submit' )templates/woocommerce/checkout/form-pay.php:105 -
MerchantX Gateway for WooCommerce10+ installs
do_action( 'woocommerce_pay_order_before_submit' )class/order-pay.php:48 -
NETbilling for WooCommerce10+ installs
do_action( 'woocommerce_pay_order_before_submit' )src/Gateways/Credit_Card/Payment_Form.php:114 -
Mobimint Mobile App Builder for WooCommerceFewer than 10 installs
do_action( 'woocommerce_pay_order_before_submit' )templates/mobile-wrapper.php:58 -
Bright Deposits for WooCommerceFewer than 10 installs
do_action( 'woocommerce_pay_order_before_submit' )templates/checkout/form-pay.php:94 -
Vanquish DepositsFewer than 10 installs
do_action( 'woocommerce_pay_order_before_submit' )templates/checkout/form-pay-payment.php:119 -
BoltUtil Payments for WooCommerceFewer than 10 installs
do_action( 'woocommerce_pay_order_before_submit' )includes/templates/form-pay.php:16 -
ithan devvn checkout for woocommerceFewer than 10 installs
do_action( 'woocommerce_pay_order_before_submit' )templates/checkout/form-pay.php:138 -
Edit Shipping Address for WooCommerceFewer than 10 installs
do_action( 'woocommerce_pay_order_before_submit' )includes/edit-shipping-address-template.php:305
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.