To add a field to the WooCommerce block checkout you need the Additional Checkout Fields API (woocommerce_register_additional_checkout_field(), WooCommerce 8.9 or newer) or a plugin built on it, because the block checkout never runs the classic woocommerce_checkout_fields filter. To remove fields, Company, Address line 2 and Phone can be hidden from the editor without code; the other address fields can only be hidden with the woocommerce_get_country_locale filter or a plugin. Most “checkout field editor” plugins and snippets written before 2024 only work on the classic checkout.

Why it happens

  • Your checkout page uses the Checkout block. New WooCommerce stores get it by default. It is built in JavaScript and reads its fields from WooCommerce’s Store API, not from the PHP form the classic checkout prints.
  • Your snippet or plugin targets the classic checkout. woocommerce_checkout_fields, woocommerce_billing_fields and the action hooks around the form (woocommerce_after_order_notes and so on) do nothing in the block checkout. WooCommerce’s developer docs say this is on purpose.
  • The plugin says so on its page. WooCommerce’s own Checkout Field Editor extension states that it works with the legacy checkout only.
  • The editor only exposes three fields. In the block checkout you can show, hide or make optional Company, Address line 2 and Phone. Renaming fields, hiding the postcode or the city, changing the order or adding a “VAT number” box is not in the settings.
  • Conditional fields need recent versions. Showing a field only for some products, shipping methods or countries depends on rules that WooCommerce’s docs list as needing WooCommerce 9.9 or newer.

How to check it yourself

  1. In WordPress, go to Pages and open your checkout page (the one set in WooCommerce > Settings > Advanced > Page setup).
  2. Open the List View in the editor. If you see a Checkout block with inner blocks such as Checkout Fields, you are on the block checkout. If you see the [woocommerce_checkout] shortcode or a Classic Checkout block, you are on the classic one.
  3. If you are on blocks, select Checkout Fields and look for Address Fields in the settings sidebar. That is where Company, Address line 2 and Phone are switched on or off.
  4. Open your checkout in a private window with a product in the cart. If a field you added with a snippet or plugin is missing, that code is classic-only.
  5. Check the plugin’s page or changelog for “block checkout” or “Checkout block” support. “Gutenberg compatible” usually means something else.

How to fix it

Remove or hide Company, Address line 2 and Phone

  1. Edit the checkout page and select Checkout Fields in the List View.
  2. Under Address Fields, switch off the field you don’t want, or keep it on and choose Optional or Required.
  3. Save. The shipping and billing forms share these settings.

On a classic theme, the same three options are also under Appearance > Customize > WooCommerce > Checkout.

Hide other address fields

For the postcode, the city, the state or the street, add a snippet with a code snippets plugin or in your child theme. This example hides the street, city, postcode and state for customers in the United States, for example for a store where everyone picks up in person:

add_filter( 'woocommerce_get_country_locale', function ( $locale ) {
    foreach ( array( 'address_1', 'city', 'postcode', 'state' ) as $key ) {
        $locale['US'][ $key ]['required'] = false;
        $locale['US'][ $key ]['hidden']   = true;
    }
    return $locale;
} );

What WooCommerce’s docs warn about this:

  • Never hide the Country field: the order fails, because the country decides which fields to show.
  • Address line 2 disappears on its own when Address line 1 is hidden.
  • The change applies to both billing and shipping.
  • Tax, fraud checks and some payment methods use the address. Place a real test order with each payment method after the change.
  • If you sell to several countries, you have to repeat the change for each one.

Marking every product as Virtual removes the shipping address and shipping options, but not the billing fields.

Add a new field

Register it on woocommerce_init:

add_action( 'woocommerce_init', function () {
    if ( ! function_exists( 'woocommerce_register_additional_checkout_field' ) ) {
        return;
    }
    woocommerce_register_additional_checkout_field( array(
        'id'            => 'mystore/vat-number',
        'label'         => 'VAT number',
        'optionalLabel' => 'VAT number (optional)',
        'location'      => 'contact',
        'type'          => 'text',
        'required'      => false,
    ) );
} );
  • location decides where it goes: contact (next to the email), address (inside both the shipping and billing forms) or order (a separate block near the end).
  • The id needs a namespace and a slash (mystore/vat-number).
  • WooCommerce’s docs list text, select, checkbox and date as field types.
  • You can’t put the field between two existing address fields in a set position, and the old classic hooks still won’t work.

Or go back to the classic checkout

If you depend on a classic-only plugin, replace the Checkout block with the Classic Checkout block or the [woocommerce_checkout] shortcode. You lose the block checkout’s layout and any extension that only works with blocks, so do it on a staging copy first.

How to stop it happening again

The code above works, but every new question means another snippet, another country to remember and another test. CheckoutPilot, our checkout field editor, does it from one screen (WooCommerce > Checkout Fields) and registers your fields with the same API WooCommerce uses. You can rename, hide or make optional the address fields and phone (for every country at once), and add text, drop-down, checkbox, number, date and other fields in the contact, address or order section. They can show only when a product or category is in the cart, or for a shipping method, payment method, country, cart total or the answer to another field. Conditions in the block checkout need WooCommerce 10 or newer. There are limits on blocks: radio buttons become drop-downs, headings are not shown, the field width setting only applies to the classic checkout, and the “virtual products only” short form is classic-only too. It costs 35 USD a year for one site, or 69 USD lifetime, with a live demo and a 14-day refund.

Frequently asked questions

Why does my woocommerce_checkout_fields snippet do nothing? Because your checkout page uses the Checkout block, and that block never runs the filter. Use woocommerce_register_additional_checkout_field() to add fields and woocommerce_get_country_locale to hide address fields.

Can I remove the billing address completely? Not from the settings. You can hide most address fields with the locale filter, but not the country, and you should test tax and payments afterwards. Virtual products only remove the shipping address.

Which WooCommerce version do I need? 8.9 or newer to add fields with the API. For fields that appear only under conditions, WooCommerce’s docs say 9.9 or newer.

Where do the answers to new fields go? They are saved on the order. Address fields keep one value for billing and one for shipping. Contact and order fields keep a single value.

Can I change the order of the checkout fields? Only partly. In the editor you can move the block that holds the order fields. A new field goes into its section, not between two specific address fields.