Rename Billing Address or Shipping Address in Woocommerce

The code below shows how to rename any of the user records. I needed only one address to be displayed to the customer, so that is why I disabled the “Shipping Address” option from Woocommerce Settings and renamed the “Billing Address” to “Delivery Address”. I thought that you guys might benefit from that as well, so there is the code:

Rename Billing Address label

 
function wc_billing_field_strings $translated_text, $text, $domain ) {
    switch ($translated_text) {
        case 'Billing Address' :
            $translated_text = __( 'Custom Text', 'woocommerce' );
            break;
    }
    return $translated_text;
}


add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );

Rename Shipping Address label

In case you are wondering how to change the Shipping Address to something come personalised, there are you go;

function wc_billing_field_strings($translated_text, $text, $domain ) {
    switch ( $translated_text) {
        case 'Billing Address' :
            $translated_text = __( 'Custom Text', 'woocommerce' );
            break;
    }
    return $translated_text;
}
function wc_shipping_field_strings( $translated_text, $text, $domain ) {
 switch ( $translated_text ) {
  case 'Shipping Address' :
  $translated_text = __( 'Custom Text', 'woocommerce' );
  break;
 }
 return $translated_text;
}
add_filter( 'gettext', 'wc_shipping_field_strings', 20, 3 );