Hi,
I’m wondering why billing details in my account page is not synced with checkout details that person needs to add? For example, I’ve add this in functions.php which gives me ability to remove all fields except First name, Last name, Country and Email from the checkout:
add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );
function custom_override_checkout_fields( $fields ) {
unset($fields[‘billing’][‘billing_company’]);
unset($fields[‘billing’][‘billing_address_1’]);
unset($fields[‘billing’][‘billing_address_2’]);
unset($fields[‘billing’][‘billing_city’]);
unset($fields[‘billing’][‘billing_postcode’]);
unset($fields[‘billing’][‘billing_state’]);
unset($fields[‘billing’][‘billing_phone’]);
unset($fields[‘order’][‘order_comments’]);
unset($fields[‘billing’][‘billing_address_2’]);
unset($fields[‘billing’][‘billing_postcode’]);
unset($fields[‘billing’][‘billing_company’]);
unset($fields[‘billing’][‘billing_city’]);
return $fields;
But problem is when you go to My account – Billing details then all those details are there. Basically I don’t understand why this is not synced so /my-account/edit-address/billing/ is showing also those details. Can you help me maybe with some hint or something how can I show only First name, Last name, Country and Email fields in that section too?