- What Are WooCommerce Checkout Fields?
- Remove Checkout Fields
- Change Labels, Placeholders, and Required Status
- Reorder Checkout Fields
- Add a Custom Checkout Field
- Quick Reference
- FAQs About WooCommerce Checkout Fields
- Can I hide checkout fields without code?
- Why don’t my changes appear in block checkout?
- Where should I put this code?
- Where is the custom field value stored?
- Conclusion
A checkout with unneeded fields loses shoppers. Every extra input is another reason to abandon the cart, and a missing field you actually need means manual follow-up after every order.
WooCommerce checkout fields are the inputs shoppers complete before paying. This guide shows how to remove, relabel, reorder, and add them with code, so you never have to edit WooCommerce core files.
What Are WooCommerce Checkout Fields?
WooCommerce groups checkout inputs into billing, shipping, and order sections. On the classic checkout, which uses the [woocommerce_checkout] shortcode, you change them through the woocommerce_checkout_fields filter. The filter passes the full field array to your function.
Block checkout, the default for newer stores, works differently. Classic filters don’t affect it, and custom fields are registered with woocommerce_register_additional_checkout_field() instead. Check which one your Checkout page uses before you start.
Remove Checkout Fields
Removing a field takes one line. Call unset() on its key, and WooCommerce skips rendering and validating it. This works for any default field, such as the company name.
<?php
add_filter( 'woocommerce_checkout_fields', 'andriy_remove_checkout_fields' );
function andriy_remove_checkout_fields( $fields ) {
unset( $fields['billing']['billing_company'] );
return $fields;
}Remove only fields your store doesn’t use. Dropping a field that shipping calculators, tax rules, or your payment gateway rely on can break checkout, so test with a real order before you go live.
For a broader strategy covering field friction, payment errors, shipping clarity, trust signals, and checkout testing, read the WooCommerce checkout optimization guide.
Change Labels, Placeholders, and Required Status
Each field is an array with keys such as label, placeholder, required, and priority. Change only the keys you need.
<?php
add_filter( 'woocommerce_checkout_fields', 'andriy_edit_checkout_fields' );
function andriy_edit_checkout_fields( $fields ) {
$fields['billing']['billing_phone']['label'] = 'Mobile number';
$fields['billing']['billing_phone']['placeholder'] = 'Optional, for delivery updates';
$fields['billing']['billing_phone']['required'] = false;
$fields['billing']['billing_email']['priority'] = 25;
return $fields;
}- label sets the visible text above the input.
- placeholder sets the hint text inside the input.
- required controls the asterisk and the server-side check. Setting it to false makes the field optional.
Reorder Checkout Fields
WooCommerce sorts fields by priority, lowest number first. The default billing priorities run from 10 for first name to 110 for email, in steps of 10.
To place a field between two others, set a number between their priorities. The snippet above sets billing_email to 25, which moves it between last name (20) and company (30).
Add a Custom Checkout Field
A custom field needs three hooks: one to render it, one to validate it, and one to save it to the order. Keeping them separate makes each part easy to debug.
Add the Field
Use woocommerce_after_order_notes to render the input below the order notes. woocommerce_form_field() outputs markup that matches your theme’s checkout styles.
For a deeper explanation of woocommerce_form_field(), including validation and saving custom values, see the dedicated function guide.
<?php
add_action( 'woocommerce_after_order_notes', 'andriy_add_checkout_field' );
function andriy_add_checkout_field( $checkout ) {
woocommerce_form_field( 'andriy_gift_note', array(
'type' => 'text',
'label' => 'Gift message',
'required' => false,
'class' => array( 'form-row-wide' ),
), $checkout->get_value( 'andriy_gift_note' ) );
}Validate the Input
Use woocommerce_checkout_process to check the submitted value. An error notice added with wc_add_notice() stops the order from being placed until the shopper fixes the field.
<?php
add_action( 'woocommerce_checkout_process', 'andriy_validate_checkout_field' );
function andriy_validate_checkout_field() {
$note = isset( $_POST['andriy_gift_note'] ) ? wp_unslash( $_POST['andriy_gift_note'] ) : '';
if ( strlen( $note ) > 200 ) {
wc_add_notice( 'Gift message must be 200 characters or fewer.', 'error' );
}
}Save the Value to the Order
Use woocommerce_checkout_create_order and update_meta_data(). This works whether WooCommerce stores orders in the custom order tables (HPOS) or in posts, so avoid update_post_meta() on the order ID.
<?php
add_action( 'woocommerce_checkout_create_order', 'andriy_save_checkout_field' );
function andriy_save_checkout_field( $order ) {
if ( empty( $_POST['andriy_gift_note'] ) ) {
return;
}
$order->update_meta_data( '_andriy_gift_note', sanitize_text_field( wp_unslash( $_POST['andriy_gift_note'] ) ) );
}Tip: Test every snippet on a staging site with a test payment gateway. A bad filter can stop all orders, so don’t add it to live checkout untested.
Use WooCommerce test mode to verify custom fields, validation errors, payment failures, order creation, and confirmation emails without charging a real card.
Quick Reference
Use this table to find the hook for each task.
| Task | Classic hook | How |
|---|---|---|
| Remove a field | woocommerce_checkout_fields | unset() the key |
| Change label, placeholder, or required | woocommerce_checkout_fields | Edit the field’s keys |
| Reorder a field | woocommerce_checkout_fields | Set priority |
| Add a field | woocommerce_after_order_notes | Render with woocommerce_form_field() |
| Validate a field | woocommerce_checkout_process | wc_add_notice( …, ‘error’ ) |
| Save a field to the order | woocommerce_checkout_create_order | update_meta_data() |
FAQs About WooCommerce Checkout Fields
Can I hide checkout fields without code?
Some plugins and theme options can hide or relabel fields. Those settings only cover the options the plugin exposes, so code gives you full control over labels, validation, and order data.
Why don’t my changes appear in block checkout?
Classic hooks only affect the shortcode checkout. Block checkout uses woocommerce_register_additional_checkout_field(), which has its own arguments and rendering.
Where should I put this code?
In a site-specific plugin or your child theme’s functions.php. A plugin is safer because it keeps working if you switch themes.
Where is the custom field value stored?
In the order meta under the key _andriy_gift_note. Read it with $order->get_meta( '_andriy_gift_note' ), which works with HPOS.
Conclusion
Start by removing the fields you don’t need, then add the ones your business depends on. Test each change with a real order before it reaches customers.
Want this done for your store? Hire a WooCommerce developer or reach out to me directly.

