I'm using the woocommerce_checkout_fields
filter to edit the value of woocommerce field labels. It works fine on the checkout page (as you might expect), however I cannot understand why it doesn't also take effect on the account pages. I thought these fields were still taken form the same place? More specifically, I'm talking about the address fields on the edit-address endpoint on woocommerce account pages?
My code attempt:
function custom_woocommerce_fields( $fields ) {
// Billing Fields
$fields['billing']['billing_first_name']['label'] = 'First name';
$fields['billing']['billing_last_name']['label'] = 'Last name';
$fields['billing']['billing_company']['label'] = 'Company name';
$fields['billing']['billing_address_1']['label'] = 'Street address';
$fields['billing']['billing_address_2']['label'] = 'Apartment, unit, etc.';
$fields['billing']['billing_city']['label'] = 'City';
$fields['billing']['billing_country']['label'] = 'Country';
$fields['billing']['billing_state']['label'] = 'County/State';
$fields['billing']['billing_postcode']['label'] = 'Postcode';
$fields['billing']['billing_email']['label'] = 'Email';
$fields['billing']['billing_phone']['label'] = 'Phone';
// Shipping Fields
$fields['shipping']['shipping_first_name']['label'] = 'First name';
$fields['shipping']['shipping_last_name']['label'] = 'Last name';
$fields['shipping']['shipping_company']['label'] = 'Company name';
$fields['shipping']['shipping_address_1']['label'] = 'Street address';
$fields['shipping']['shipping_address_2']['label'] = 'Apartment, unit, etc.';
$fields['shipping']['shipping_city']['label'] = 'City';
$fields['shipping']['shipping_country']['label'] = 'Country';
$fields['shipping']['shipping_state']['label'] = 'County/State';
$fields['shipping']['shipping_postcode']['label'] = 'Postcode';
$fields['shipping']['shipping_email']['label'] = 'Email';
$fields['shipping']['shipping_phone']['label'] = 'Phone';
// Account Fields
$fields['account']['account_username']['label'] = 'Username or email';
$fields['account']['account_password']['label'] = 'Password';
// Order Fields
$fields['order']['order_comments']['label'] = 'Order notes';
return $fields;
}
add_filter( 'woocommerce_checkout_fields' , 'custom_woocommerce_fields' );
Fields doesn't get customized on My account > Addresses (edit billing or shipping address).