Change "Place order" button text on WooCommerce Checkout page
In this tutorial I am going to show you a couple ways how you can change checkout button text. But please note, that this text can be changed dynamically depending on a payment method selected. We will also cover that below.

Theoretically if you know about WooCommerce template structure, you can replace button text in this file: templates/checkout/payment.php
But please do not do it, because there is a hook for that. Even two. I will show you both of them.
Method 1. Change button text with woocommerce_order_button_text hook
The most simple way, just copy this code to your current theme functions.php
file (but better β a child theme or a custom plugin, otherwise you will lose your changes every time after your theme received an update).
/**
* @snippet Change "Place Order" Button text @ WooCommerce Checkout
* @sourcecode https://rudrastyh.com/woocommerce/place-order-button-text.html#woocommerce_order_button_text
* @author Misha Rudrastyh
*/
add_filter( 'woocommerce_order_button_text', 'misha_custom_button_text' );
function misha_custom_button_text( $button_text ) {
return 'Submit'; // new text is here
}
You can also change button text if a specific product is in the cart, or if products from specific categories are in the cart etc.
add_filter( 'woocommerce_order_button_text', 'misha_custom_button_text_for_product' );
function misha_custom_button_text_for_product( $button_text ) {
$product_id = 18; // a specific product ID you would like to check
if( WC()->cart->find_product_in_cart( WC()->cart->generate_cart_id( $product_id ) ) ) {
$button_text = 'Submit';
}
return $button_text;
}
Method 2. Change button text with woocommerce_order_button_html hook
Using this method, our main goal is to replace it with str_replace()
PHP function in woocommerce_order_button_html
filter hook. Here is how to do it:
add_filter( 'woocommerce_order_button_html', 'misha_custom_button_html' );
function misha_custom_button_html( $button_html ) {
$button_html = str_replace( 'Place order', 'Submit', $button_html );
return $button_html;
}
The hook woocommerce_order_button_html
accepts only one parameter which is the button HTML. This hook also allows you to create the button HTML from scratch.
$order_button_text = 'Submit';
$button_html = '<button>' . $order_button_text . '</button>';
Change Button Text for Payment Gateways
This one will be a little tricky π½ First of all, your custom payment gateway may not have a hook for that and second β of course you can not make changes directly in payment gateway plugin files.
So, what to do? JavaScript? Of course, no! π±
Even if a payment gateway doesnβt have a hook for that, it must support localization. So, gettext
hook will help us in this case.
/**
* @snippet Change "Proceed to PayPal" Button text @ WooCommerce Checkout
* @sourcecode https://rudrastyh.com/woocommerce/place-order-button-text.html#payment_gateways_text
* @author Misha Rudrastyh
*/
add_filter( 'gettext', 'misha_custom_paypal_button_text', 20, 3 );
function misha_custom_paypal_button_text( $translated_text, $text, $domain ) {
if( 'Proceed to PayPal' == $translated_text ) {
$translated_text = 'Pay with PayPal'; // new button text is here
}
return $translated_text;
}
You can apply this code for any payment gateway, just check how it renames the button in English and use that phrase in the above code on line 10.

And please be careful because the string you would like to override like “Proceed to PayPal” could be used somewhere else on your website. If so, just add a condition.

Misha Rudrastyh
Hey guys and welcome to my website. For more than 10 years I've been doing my best to share with you some superb WordPress guides and tips for free.
Need some developer help? Contact me
Hi,
When i’m trying to do Method 1 option my site is down, when i’m deleting the code is back online…
Any suggestions how i can change the Button text without breaking my site? π
Thanks,
Gabriel
Hi Gabriel,
Did you paste my code after opening
<?php
tag? πHi Gabriel,
The 3rd method was working for me until some WooCommerce version, but with the newest one it does not work, as it uses JS to change the text:
/woocommerce/assets/js/frontend/checkout.js
line 114:Now non of your method works in my case (where I use a payment gateway).
I tested today, every method is still working ;)
Hi Misha.
First, let me say thanks for your all of your very nice tutorials on WC… However, there is an issue with this one.
If you change the text with a filter, and then update the user Shipping or Billing info, the payment method section and “Place Order” button refresh with Ajax, which replaces the text in the button back to the original. It seems like the only solution would be something on ajaxComplete.
YES! I need this so bad! I used the “Translated text” method. Thank you so much!
You’re welcome! :)
Hey, how do I add multiple products in your 2nd example?
Hey, thanks for a good question,
You can do it like this: