I want to add custom label to phone and email information on 'Thank You' page. With YITH WooCommerce Checkout Manager I customized some fields and added the following code to functions.php:
function woo_custom_order_formatted_billing_address( $address , $WC_Order ) {
$address = array(
'first_name' => 'First Name: ' . $WC_Order->billing_first_name,
'address_1' => 'Address: ' . $WC_Order->billing_address_1,
'city' => 'City: ' . $WC_Order->billing_city,
);
if(!empty($ship_date)) $address['order_time'] = 'Shipping time: ' . $ship_date;
if(!empty($WC_Order->billing_corpus)) $address['house'] = 'House: ' . $WC_Order->billing_house;
if(!empty($WC_Order->billing_corpus)) $address['corpus'] = 'Corpus: ' . $WC_Order->billing_corpus;
if(!empty($WC_Order->billing_flat)) $address['flat'] = 'Room: ' . $WC_Order->billing_flat;
if(!empty($WC_Order->billing_phone)) $address['billing_phone'] = 'Phone: ' . $WC_Order->billing_phone;
return $address;
}
But for some reason label 'Phone' doesn't want to be added.
Is there any solution?