WooCommerce now has a built-in way to add custom fields to the block checkout: a developer registers a text, select, checkbox or date field in code, in one of three places (contact, address or order). The old route, editing the classic checkout with PHP filters or a field editor plugin, often does not carry over to the Checkout block. If you want fields without writing code, you need a plugin built for the block checkout. This guide covers what works, what the native option cannot do, and how to choose.
Why did my checkout field editor stop working?
Since WooCommerce 8.3, the Cart and Checkout blocks are the default for new installations. Existing stores keep the checkout they had until they change it. The same WooCommerce FAQ says that when a plugin touches checkout but does not support the blocks, its functionality will not be visible, and in some cases it can break the experience.
Classic field editors typically work by changing the checkout fields in PHP, using hooks. The Checkout block is a different system, and the WooCommerce FAQ says it favours explicit APIs over action and filter hooks. The result is a familiar pattern: you install a field editor, change a field, save, and nothing changes on the page.
Two things are worth knowing:
- Your checkout may be on blocks without you having chosen it. A new store, a rebuilt checkout page or a theme change can do it.
- WooCommerce says it has no plans to phase out the classic checkout in core, a statement in a comment from a WooCommerce developer on its FAQ post. Going back is possible, but the direction of travel is blocks.
How do you add custom fields to the block checkout natively?
WooCommerce documents an additional checkout fields API. It is a developer feature: you call woocommerce_register_additional_checkout_field() on the woocommerce_init action (or later), with an id, a label, a location and a type.
What it supports, according to the documentation:
- Types: text, select, checkbox and date.
- Locations: contact, address and order. A field can only be shown in one location.
- Saving: contact fields are saved to the shopper’s account. Address fields are saved to the customer and the order. Order fields are not part of the saved account or address data, and are not pre-filled on later orders.
This is a solid foundation, and if you have a developer it may be all you need. For a store owner without one, notice the limits the same page lists:
- Address fields always appear in both the billing and shipping addresses. You cannot have one in only one of them.
- You cannot add attributes to select fields for now, and
autofocusanddisabledare not passed through. - You cannot yet choose the meta key for a field.
- For logged-in customers, the value is only saved once they place an order.
It also adds fields. It does not give you a screen to rename, hide or reorder the default address fields, and it does not give you a way to show a field only when the cart holds a certain product. For those you write more code, or use a plugin.
How do you edit or hide the default fields?
Renaming “Company name”, making “Address line 2” optional or hiding the phone number is the most common request, and the one most affected by the switch to blocks. Three things to check first:
- Does your tool support the block checkout? Test on your real checkout page.
- Does it apply the same changes everywhere? The checkout, the classic checkout if you keep it, and My Account all show addresses.
- Does it warn you before you hide something you need? Shipping zones, tax rates and payment gateways can rely on address fields. Hiding the postcode of a store that charges tax by postcode is a quiet way to break your tax. Country in particular can never be sensibly hidden.
What should a checkout field plugin do?
A short test list:
- Edit labels, order and required status of the default address fields on the block checkout.
- Add text, select and checkbox fields to the contact, address and order sections.
- Save values on the order and show them on the admin order, in emails and in My Account.
- Expose values to the REST API if you connect other systems.
- Include the values in WooCommerce’s personal data export and eraser.
- Let you set rules and an error message of your own, such as a length or a pattern for a reference number.
- Import fields from the plugin you are leaving, so you do not rebuild a checkout by hand.
How do you move from an older field editor?
Do not delete the old plugin first.
- Take a note or screenshot of your current checkout, including every custom field.
- Try the new tool on a staging site and place test orders for each kind of customer you have.
- Import if the tool offers it, and read the preview before you accept it.
- Deactivate the old plugin, or its fields can show twice on the classic checkout.
- Check an old order. Past orders usually keep their values in the old plugin’s data, so keep that data until you no longer need to look at those orders.
How does Block Checkout Fields work?
Block Checkout Fields for WooCommerce is our plugin. It edits, hides and reorders the default address fields and adds your own, and the changes apply the same way on the block checkout, the classic checkout and My Account. Custom fields use WooCommerce’s own additional checkout fields.
The free version includes:
- Rename, hide, reorder and require the default address fields, with a warning before you hide one your shipping, tax or payments need
- Up to 20 custom text, select and checkbox fields in the contact, address or order section
- Length and pattern rules with your own error message
- Values on the order, in emails, in My Account and in the REST API, and in the personal data export and eraser
- Import from another checkout field editor, with a preview
Pro adds fields that show only when another field’s answer, chosen products or the delivery method call for them, file upload fields and fields that add a fee to the order, such as gift wrapping. Pro is $49 a year for 1 site and $149 a year for unlimited sites, in US dollars, with email support from us. Pro is not on sale yet and the free version is on its way to wordpress.org, so for now you can register your interest on the plugin page. It needs WordPress 6.6, WooCommerce 9.0 and PHP 8.1 or later.
What should you ask customers for at checkout?
Every field costs you some conversions, so add only what the order cannot go through without. Good reasons: a delivery instruction, a gift message, a business reference for invoicing, an allergy note. Weak reasons: marketing questions that can wait until after the order.
Never ask for card numbers, security codes or national identity numbers in a field. Those belong with your payment gateway. If you collect personal data in a field, check your privacy policy covers it. For more on picking the right platform for custom checkout work, see Shopify or WooCommerce.
What to do next
Check which checkout you use: open your checkout page in the editor and see whether it contains the Checkout block or a shortcode. Then list the fields you need to change, decide whether the native API with a developer or a plugin suits you better, and test on staging before you touch the live store. If you need something that no plugin does, we quote custom work at a fixed price after a free call on our pricing page.
Sources
- WooCommerce developer docs: Additional checkout fields
- WooCommerce developer blog: FAQ, Cart and Checkout blocks by default
- WP Tavern: WooCommerce 8.3 makes the blocks default on new installations
More questions
Why did my checkout field plugin stop working?
The most likely reason is that your store now uses the Checkout block, and the plugin was built for the classic checkout. WooCommerce warns that a plugin that touches checkout without supporting the blocks will usually not show its functionality. Check the plugin's own documentation for block checkout support, or switch to a tool that has it.
Can I go back to the classic checkout?
Yes. WooCommerce has said it has no plans to phase out the classic checkout in core at this time. Weigh that against the cost of staying behind: new extensions and features are increasingly built for blocks first.
Should I collect sensitive data in a checkout field?
No. Do not collect card numbers, security codes or national identity numbers in a checkout field. Fields are saved on the order and shown in emails and the admin, which is the wrong place for them. Use your payment gateway for payment details.
What happens to old orders when I remove a field?
It depends on the tool. Before you delete a field, place a test order, then look at an old order to check its value still shows. In Block Checkout Fields, a deleted field leaves the checkout but keeps its label, so past orders still show its value.