WooCommerce is undoubtedly a fantastic piece of software for WordPress e-commerce, but it’s often very difficult to customise your shop without purchasing addon after addon from the developers.

Change Woocommerce Billing Labels and Text

Recently, a client using the Avada theme asked how they could change the Billing Details and Billing Information text on the cart checkout page, and thankfully it’s a fairly simple process.

Simply add the following code to your theme’s (or child theme preferably) functions.php file and you should be good to go.

//Change the billing details heading and the billing information tab label

function wc_billing_field_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Billing Address' :
$translated_text = __( 'Customer Information', 'woocommerce' );
break;
case 'Billing details' :
$translated_text = __( 'Customer Details', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );

Replace the necessary text with your own, and in each case (since we’re using PHP’s CASE function here) the text will change to the text you provide, in this case “Billing Address” (a tab label) becomes “Customer Information”, and “Billing details” (a heading) becomes “Customer Details”.

Happy shopping!