WordPress filter hook
woocommerce_pay_order_button_html
Defined by WooCommerce and fired by 13 plugins in total, running on 7.2M+ sites between them.
“This filter is documented in woocommerce/templates/checkout/form-pay.php.”
How to use woocommerce_pay_order_button_html
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_pay_order_button_html', function( $value ) {
// Change $value here.
return $value;
}, 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.
13 plugins that fire woocommerce_pay_order_button_html
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )templates/checkout/form-pay.php:102 -
CartFlows200,000+ installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )woocommerce/template/checkout/form-pay.php:103 -
FunnelKit30,000+ installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )modules/checkouts/public/template-common/form-order-pay.php:218 -
Payment Plugins Braintree For WooCommerce2,000+ installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )templates/checkout/subscription-form-pay.php:101 -
Deposits & Partial Payments for WooCommerce1,000+ installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )templates/checkout/form-pay.php:95 -
KiriminAja Official200+ installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )templates/woocommerce/checkout/form-pay.php:107 -
MerchantX Gateway for WooCommerce10+ installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )class/order-pay.php:50 -
NETbilling for WooCommerce10+ installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )src/Gateways/Credit_Card/Payment_Form.php:116 -
Vanquish DepositsFewer than 10 installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )templates/checkout/form-pay-payment.php:123 -
Bright Deposits for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )templates/checkout/form-pay.php:96 -
BoltUtil Payments for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt primary" id="place_order" value="' . esc_attr( $boltutil_wc_button ) . '" data-value="' . esc_attr( $boltutil_wc_button ) . '">' . esc_html( $boltutil_wc_button ) . ' <span aria-hidden="true">→</span></button>' )includes/templates/form-pay.php:18 -
ithan devvn checkout for woocommerceFewer than 10 installs
apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' )templates/checkout/form-pay.php:140 -
Edit Shipping Address for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_pay_order_button_html', $button_html )includes/edit-shipping-address-template.php:317
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.