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:

functions.php
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.

  1. WooCommerce icon 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
  2. CartFlows icon 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
  3. FunnelKit icon 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
  4. Payment Plugins Braintree For WooCommerce icon 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
  5. Deposits & Partial Payments for WooCommerce icon 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
  6. KiriminAja Official icon 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
  7. MerchantX Gateway for WooCommerce icon 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
  8. NETbilling for WooCommerce icon 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
  9. Vanquish Deposits icon 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
  10. Bright Deposits for WooCommerce icon 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
  11. BoltUtil Payments for WooCommerce icon 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
  12. ithan devvn checkout for woocommerce icon 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
  13. Edit Shipping Address for WooCommerce icon 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.