Site logo

Archived topic

How to change the text on the Woocommerce checkout page

4 replies · Started by Wendy on December 16, 2021

Viewing posts 1–5 of 5

Hello awesome team at GP :-)

I don't know if it is even possible to do this, but could there be a way to change some of the text on the Woocommerce checkout page?

For instance the heading 'Order notes (optional)' and the text inside the little box below it 'Notes about your order eg special delivery'

Thank you

Hi there,

it requires some PHP, you can update the label which defaults to: ‘Order notes (optional)’ and the forms placeholder.

function db_modify_woo_checkout_fields( $fields ) {
    $fields['order']['order_comments']['label'] = 'Your Order Notes form label here';
    $fields['order']['order_comments']['placeholder'] = 'Your Order Notes form placeholder here';
    
    return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'db_modify_woo_checkout_fields' );

Theres a whole bunch of other fields and filters available - for reference:

https://woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/

HOW TO Add PHP: https://docs.generatepress.com/article/adding-php/

David that is Super Fabulous!! Thank you so much! OMG you guys know how to make us happy :-)

Awesome - glad to be of help!

This archived topic is closed to new replies.