You can filter and change WooCommerce’s ‘Place Order’ Text Button on the Checkout Page using the filter woocommerce_order_button_html

 

The default mark up of the Place Order checkout button is:

<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="Place order" data-value="Place order">Place order</button>

You can use the filter like so:

add_filter( 'woocommerce_order_button_html', 'custom_order_button_html');
function custom_order_button_html( $button ) {

  // Button text
  $order_button_text = __('Place Order Now', 'woocommerce');


  // Markup - add in classes, data attibutes
  $button = '<input type="submit" class="button alt new-css-class" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '"/>';

  return $button;
}

So in the above the button text is changes and an extra CSS is added, this is where you can also add in extra data attributes. All code goes in functions.php file.

Leave a Comment