Skip to content

WooCommerce Rename Place Order Button at Checkout

woocommerce place order by payment gateway

WooCommerce Rename Place Order Button at Checkout

Today, I will show you the easiest way to dynamically and conditionally change it based on the selected payment gateways while checking out. To do this? this snippet requires a payment gateway “ID”. Here is the reference for payment gateway IDs in case you don’t know how to retrieve them.

Turn leads into sales with free email marketing tools (en)
woocommerce find gateway ID
WooCommerce find gateway ID

PHP Snippet: Rename the “Place Order” Button Dynamically @ WooCommerce Checkout Page


 * @snippet       Rename "Place Order" By Gateway @ WooCommerce Checkout
 * @how-to        Get Resources FREE
 * @author        WP Coders Club
 * @source
 * @compatible    WooCommerce 6
add_filter( 'woocommerce_available_payment_gateways', 'wpc_rename_place_order_button' );
add_filter( 'woocommerce_available_payment_gateways', 'wpc_rename_place_order_button_bacs' );
function wpc_rename_place_order_button( $gateways ) {
    if ( $gateways['cod'] ) {
        $gateways['cod']->order_button_text = 'Confirm Cash on Delivery';
    return $gateways;

function wpc_rename_place_order_button_bacs($gateways){
        $gateways['bacs']->order_button_text = 'View Bank Details';
    return $gateways;


Leave a Reply

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.