Search code examples
wordpresswoocommerce

How to change WooCommerce "Pay For Order" button text


I've added a code snippet to the child theme functions.php page to change the "Pay For Order" button on the checkout page to read "Pay Now". The text hasn't changed. What am I missing?

add_filter( 'woocommerce_order_button_text', 'wc_custom_order_button_text' ); 

function wc_custom_order_button_text() {
    return __( 'Pay Now', 'woocommerce' ); 
}

Solution

  • Could you please try to give a try to woocommerce_pay_order_button_text which allows the text of the submit button on the Pay for Order page to be changed.

    add_filter( 'woocommerce_pay_order_button_text', 'wc_custom_pay_order_button_custom_text' ); 
    
    function wc_custom_pay_order_button_custom_text() {
        return __( 'Pay Now', 'woocommerce' ); 
    }