• Resolved jahnmax6

    (@jahnmax6)


    I’m Dutch and in The Netherlands we use a different address format than in the US. We’d have to spit the street name and the house number. In order to fix that I used “address line 1” for ‘Street name’ and added a new custom checkout field called “house number”. When a user orders something everything works fine at checkout. But in the WordPress/Woocommerce admin I’m having difficulties.

    When I’m viewing an order everything looks fine. That’s because I have a new address format:

    add_filter( ‘woocommerce_localisation_address_formats’, ‘new_address_formats’ );

    function new_address_formats( $formats ) {
    $formats[‘NL’] = “{name}\n{company}\n{address_1} {billing_house_number} {shipping_house_number}\n{postcode} {city}\n{country}”;
    return $formats;
    }

    But the problem comes when I click on the “edit address” icon. Address line 1 isn’t called ‘Street name’, the House Number field isn’t present at all and Address line 2 needs to be unset:

    PS: please see the link I attached with screenshoot

    https://wordpress.stackexchange.com/questions/331620/how-to-be-able-to-edit-custom-address-fields-in-woocommerce-admin

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ross V. a11n

    (@rossviviano)

    Automattic Happiness Engineer

    Hi there,

    This is a fairly complex development topic, so I’m going to leave it open for a bit to see if anyone is able to jump in to help you out.

    I can also recommend the following places for more development-oriented questions:

    WooCommerce Slack Community: https://woocommerce.com/community-slack/
    Advanced WooCommerce group on Facebook: https://www.facebook.com/groups/advanced.woocommerce/

    Thread Starter jahnmax6

    (@jahnmax6)

    Hi Thanks for replying,

    I accept that is complex development, but the other problem with billing_address_2 when some one put the appartement number it show beside the billing_address_1. I give a example to be clear if I life in street 3 and appartement 4 in woocommerce admin order show: street 34
    this is somehow confliction for EU country, is there any possibility to have billing_address_2 in second line like this:
    street 3
    appartemnt 4

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding new field to billing/shipping address under orders page in admin’ is closed to new replies.