• Resolved svarcko

    (@svarcko)


    Hello there.
    I changed the postcode field to be select and I added custom values that I need for the custom local pickup shipping zone. But now I need to change the postcode label and I need it to show as last field on the checkout page.
    I tried with:
    “woocommerce_default_address_fields”
    “woocommerce_shipping_fields”
    “woocommerce_billing_fields”
    and the label and order of the fields is not changing.

    This is the code i am using:

    
    add_filter('woocommerce_default_address_fields' , 'customize_postcode_field');
    function customize_postcode_field( $fields ) {
      $fields['postcode']['label'] = 'Testlabel';
      $fields['postcode']['type'] = 'select';
      $fields['postcode']['priority'] = 100;
      $address_count = 10;
      for ($address = 1; $address <= $address_count; $address++) {
        $fields['postcode']['options'][$address] = $address;
      }
      return $fields;
    }
    

    Any suggestion on how can i change the label and position of the postcode field?
    Thanks in advance and best wishes.

    • This topic was modified 6 years, 2 months ago by svarcko.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Changing billing postcode label and priority’ is closed to new replies.