WooCommerce Address Fields Generator

Relabel, reorder and add WooCommerce address fields across checkout, My Account and the admin, with country locale overrides handled.

Live output

Enable JavaScript to customise; default output below.

Field changes
  1. Required

Each entry adjusts one core address field. Leave a value empty to keep what WooCommerce has.

Live preview address-fields.php
<?php
/**
 * WooCommerce address fields.
 *
 * woocommerce_default_address_fields covers checkout, My Account addresses
 * and the admin order screen at once, which the checkout-only filter does not.
 */

/**
 * Relabels and reorders the address fields.
 *
 * @param array $fields Address fields.
 * @return array
 */
function my_store_address_fields( $fields ) {

	if ( isset( $fields['address_1'] ) ) {
		$fields['address_1']['label'] = __( 'Street address', 'my-store' );
		$fields['address_1']['placeholder'] = __( 'House number and street name', 'my-store' );
	}

	return $fields;
}
add_filter( 'woocommerce_default_address_fields', 'my_store_address_fields' );

Output is valid and updates as you type.

Relabel, reorder and extend WooCommerce address fields in the one filter that covers checkout, My Account and the admin order screen together, with the country rules that would otherwise undo your changes.

How to use

  1. Use woocommerce_default_address_fields for anything about the address itself. The checkout-only filter leaves My Account and the admin showing the old labels.
  2. Set priorities in tens, as core does, so there is room to insert something between two fields later.
  3. Turn on the locale override if you change what is required. Country rules run after your filter and put it back.
  4. Add a custom field only when the order genuinely needs it. Every extra field costs conversions at checkout.
  5. Show any custom field on the admin order screen. A value nobody in the warehouse can see was never really collected.

Example

function acme_address_fields( $fields ) {
	if ( isset( $fields['address_1'] ) ) {
		$fields['address_1']['label']    = __( 'Street address', 'acme' );
		$fields['address_1']['priority'] = 50;
	}

	return $fields;
}
add_filter( 'woocommerce_default_address_fields', 'acme_address_fields' );

The isset() check matters: another plugin may have removed the field, and assigning into a missing key creates a half-built field that renders as an empty row.

Pitfalls

  • Country locales override required flags per country, and they run after this filter. Making postcode optional here lasts until the customer selects a country that requires one.
  • woocommerce_checkout_fields covers checkout only. Address labels also appear in My Account and in the admin, which is why the default address filter is the better place.
  • Priorities decide the visual order. Two fields with the same priority sort unpredictably.
  • A custom checkout field is not saved automatically unless it is in the billing or shipping group, where WooCommerce saves it as _billing_<key>.
  • The Checkout block, default since WooCommerce 8.3, does not use these filters. It has its own registration API for additional fields.
  • Changing a label does not change the key. Exports, integrations and accounting systems still see billing_address_1.
  • Every field you add is a field a customer has to fill in. Checkout length is one of the most reliable predictors of abandonment.
  • Fields in the shipping group are hidden when the order needs no shipping, so anything you always need belongs in billing.

Compatibility

woocommerce_default_address_fields, woocommerce_checkout_fields and woocommerce_get_country_locale have been stable since WooCommerce 2.x and still apply to the classic shortcode checkout in WooCommerce 8 and 9. The Checkout block uses woocommerce_register_additional_checkout_field() instead, which arrived in 8.9. WC_Order::get_meta() needs WooCommerce 3.0. The generated code targets PHP 7.0 and up, and the tool runs entirely in your browser.

Frequently asked questions

Why did my required change stop working?
A country locale overrode it. Turn on the locale override so your rule runs last.
Which filter should I use?
woocommerce_default_address_fields for address fields, because it covers checkout, My Account and the admin. Use the checkout filter only for fields that exist at checkout alone.
Does this work with the Checkout block?
No. Blocks use their own additional fields API. These filters apply to the classic checkout.
Where is my custom field stored?
As order meta, _billing_<key> or _shipping_<key>, saved by WooCommerce because the field sits in that group.
How do I reorder the fields?
Set priority. Core uses tens, so 45 puts a field between 40 and 50.

From the people who built this tool

WP Adminify

The WordPress admin, rebuilt: a dashboard worth looking at, menu and column control, a real file manager and the login page your client sees.

See WP Adminify Free version on WordPress.org

Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.