How to Change Checkout Button Text in WooCommerce [Place Order]

WooCommerce Change Checkout Button Text Place Order

You can change the checkout button text in the WooCommerce checkout page from ‘Place Order’ to your custom text using without using a plugin.

It is an easy WooCommerce customization task that requires you to add a filter to your theme functions with your custom text that replaces the PLACE ORDER text.

In this post, I am going to guide you step by step on how to change the checkout button text highlighting the important things that you should pay attention to.

By default, the WooCommerce checkout button text is ‘PLACE ORDER’ Most users want to change this to a custom text especially where you have a specific message for your customers.

WooCommerce Change Checkout Button Text

The text button that we will change in this tutorial is shown in the image below.

This is the checkout button text we want to change using a filter.

WooCommerce Change Checkout Button Text Place Order

Steps to Change WooCommerce Checkout Button Text

The following are the steps that you should undertake to change the place order button text.

  1. Log into your WooCommerce site and go to the theme editor- Main Dashboard menu > Appearance > Theme Editor
  2.  Open the functions.php file via the WordPress dashboard or you can open it through the web hosting Cpanel or the FTP client like Filezilla.
  3.   Create the filter hook that will hook on woocommerce_order_button_text  for example, add_filter( 'woocommerce_order_button_text', 'njengah_change_checkout_button_text' );
  4.   Add the callback function with a single parameter $button_text and in the return, statement adds the string with the custom text that you want to use to replace the default checkout button text.
  5.   Save these changes and visit the checkout page to see if the checkout button text has been effectively changed. Let us now illustrate with an example and the full code snippet.

Change Place Order Text in WooCommerce Checkout Page

Suppose we want to change this text to ‘Pay Now’ We can use a filter hook that hooks on the woocommerce_order_button_text  WooCoomerce hook.

The callback function should filter the button text and return the custom button text. The following is the code that you should add to the functions.php file to change the checkout button text to a custom text.

Do not forget to replace the custom text in the return statement with your respective custom text. For this tutorial I have added this text as ‘Pay Now’ and the following is the full code snippet that you should add to your theme:

/**
 * Change checkout button text  "Place Order" to custom text in checkout page 
 *
 * @param $button_text
 *
 * @return $string
 */
add_filter( 'woocommerce_order_button_text', 'njengah_change_checkout_button_text' );
 
function njengah_change_checkout_button_text( $button_text ) {
	
   return 'Pay Now'; // Replace this text in quotes with your respective custom button text
   
}

When you add this code to the functions.php and you update the theme file, you should see the checkout button text has changed to the custom text you added in the return statement as shown in the image below:

WooCommerce Change Checkout Button Text Place Order

 

There are several other conditions you can apply when changing the checkout button text and you can also hook on the woocommerce_order_button_html but ultimately the snippet shared above is the simplest way to change the checkout button text.

Conclusion

In this post, we have outlined the simplest way to change the checkout button text in the checkout page with an example. You can add this code to your theme and edit the text.

Similar Articles

Comments are closed.