WordPress action hook
woocommerce_after_checkout_validation
Defined by WooCommerce and fired by 10 plugins in total, running on 7.2M+ sites between them.
“We need to trigger this WooCommerce action since 3rd party plugins use it to validate the checkout page. If we want parity with how the WooCommerce checkout validation works, this action needs to be triggered.”
How to use woocommerce_after_checkout_validation
It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'woocommerce_after_checkout_validation', function( $data, $errors ) {
// Your code runs here.
}, 10, 2 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
10 plugins that fire woocommerce_after_checkout_validation
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_after_checkout_validation', $data, $errors )includes/class-wc-checkout.php:1142 -
Mercado Pago payments for WooCommerce100,000+ installs
do_action( 'woocommerce_after_checkout_validation', $data, $errors )src/Helpers/CheckoutValidator.php:55 -
Payment Plugins for PayPal WooCommerce80,000+ installs
do_action( 'woocommerce_after_checkout_validation', $data, $this->errors )src/CheckoutValidator.php:42 -
MultiStep Checkout for WooCommerce3,000+ installs
do_action( 'woocommerce_after_checkout_validation', $data, $errors )classes/class-thwmscf-settings.php:2206 -
Sezzle Woocommerce Payment1,000+ installs
do_action( 'woocommerce_after_checkout_validation', $data, $errors )includes/class-sezzle-checkout.php:588 -
Briqpay for WooCommerce20+ installs
do_action( 'woocommerce_after_checkout_validation', $data, $errors )includes/class-checkout-handler.php:2931 -
Maytes for WooCommerceFewer than 10 installs
do_action( 'woocommerce_after_checkout_validation', $data, $wp_errors )includes/class-maytes-woo-checkout-route.php:333 -
AppYourShopFewer than 10 installs
do_action( 'woocommerce_after_checkout_validation', $data, $errors )hooks/OrdersHooks.php:50 -
ReplyNext AIFewer than 10 installs
do_action( 'woocommerce_after_checkout_validation', $data, $errors )includes/class-replynextai-checkout-order.php:50 -
Antom Shopping AgentFewer than 10 installs
do_action( 'woocommerce_after_checkout_validation', $checkout_data, $errors )includes/class-pay-api.php:2250
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.