Drupal 7 addressfield remove "Address 2" and rename "Address 1" fields

Posted on 26/08/2019
Just use the following code in your .module file:
  1. /**
  2.  * Implements hook_field_widget_form_alter().
  3.  */
  4. function MY_MODULE_field_widget_form_alter(&$element, &$form_state, $context) {
  5.   if ($context['field']['type'] == 'addressfield') {
  6.     $element['street_block']['thoroughfare']['#title'] = t('Address');
  7.     $element['street_block']['premise']['#access'] = FALSE;
  8.   }
  9. }