Author: Ellana Morriz

  • WooCommerce Variation Swatches: Colour, Image and Button Swatches (2026)

    To add variation swatches in WooCommerce, create your attributes under Products → Attributes, install a free swatch plugin such as Variation Swatches for WooCommerce, and set each attribute’s Type to Color, Image or Button. Then give every term its colour or image. Variable products show the swatches instead of dropdowns automatically.

    Everything below was tested on WordPress 7.1.5, WooCommerce 11.3.1, Variation Swatches for WooCommerce 2.6.2 and the Twenty Twenty-Five block theme (December 2026). By default WooCommerce shows variations as plain dropdowns, like this:

    Classic Tee product page with the default WooCommerce dropdowns for Color and Size
    Before: two “Choose an option” dropdowns.

    By the end you’ll have colour swatches, button swatches and image swatches on a variable product. You’ll also know how they behave when a shopper picks a combination, adds it to the cart, or picks one that is out of stock.

    How to add variation swatches (6 steps)

    Step 1: Create global attributes and terms

    Swatches belong to attribute terms: “Red” gets a colour, “Stripes” gets an image. Terms only exist on global attributes, so create your attributes at Products → Attributes (not inside a single product), then use Configure terms to add the values. I created Color (Red, Blue, Green, Black), Size (36, 38, 40) and Pattern (Stripes, Dots, Plain). If you need a refresher, see our WooCommerce product attributes guide.

    Step 2: Install a swatch plugin

    In Plugins → Add New Plugin search for “Variation Swatches for WooCommerce” (slug woo-variation-swatches, about 300,000 active installs on WordPress.org) and activate it. I used version 2.6.2 and it ran without errors on WooCommerce 11.3.1. After activation the attribute Type field gains the options Color, Image, Button and Radio.

    Step 3: Set the attribute type to Color (colour swatches)

    Go to Products → Attributes, click Edit under “Color”, set Type to Color and click Update.

    Edit attribute screen for Color with the Type field set to Color

    Now open Configure terms for Color. Each term (and the “Add new Color” form) has a Color picker. Pick a colour per term and save. The term list shows a coloured square next to each name.

    Color attribute terms with a colour square for each term and the Color picker field in the Add new Color form

    Step 4: Button swatches for sizes, image swatches for patterns

    Same screen, different type. Set Size to Button: no per-term setup is needed, the term name becomes the button label.

    Edit attribute screen for Size with the Type field set to Button

    For Pattern choose Image as the type, then upload an image for each term in Configure terms (the form gets an Upload / Add image button). Small square images work best; mine are 120×120 px.

    Pattern attribute terms with an uploaded image for each term

    Step 5: Use the attributes on a variable product

    Edit or create a product, set Product data to Variable product, open the Attributes tab, add the global attributes with Add global (select all terms, tick Used for variations) and click Save attributes.

    Product data panel of a variable product, Attributes tab, with Color and Size added as global attributes

    Then open the Variations tab and generate one variation per combination (here 4 colours × 3 sizes = 12). Give each a price, and set any combination you can’t supply to out of stock. If you’re new to this, our variable products articles walk through it.

    Variations tab listing one variation for every Color and Size combination

    Step 6: Check the product page

    Open the product. The Color attribute shows coloured squares and Size shows buttons. Add to cart stays greyed out until the shopper has chosen a value for every attribute.

    Classic Tee product page with four colour swatches and three button swatches for size
    Colour swatches and button swatches, nothing selected yet.

    Choosing Blue and 38 ticks both swatches, shows the selected value next to the label, updates the price to the variation’s price and enables Add to cart. A Clear link appears under the swatches so the shopper can start over.

    Blue and 38 selected on the product page, the price updated and Add to cart enabled
    Final result: Blue and 38 selected, price $24.00, Add to cart enabled.

    Image swatches look like this on the Pattern attribute:

    Canvas Tote product page with three image swatches for Pattern

    What happens at Add to cart (checked)

    • Swatches are only a nicer front end. The product page still submits the normal WooCommerce form: add-to-cart, variation_id, attribute_pa_color and attribute_pa_size. I submitted Blue / 38 (variation ID 979) and WooCommerce confirmed “has been added to your cart”.
    • Cart block and classic cart. The cart contents come from WooCommerce, not the plugin. The Store API, which the Cart and Checkout blocks read, returned the line item with Color: Blue and Size: 38. The plugin only changes the product page, so block and classic cart/checkout need no extra setup.
    • Out-of-stock combinations are still selectable by default. With Green selected, the 40 button was not crossed out. Picking Green + 40 (set to out of stock) shows “Out of stock” and keeps Add to cart greyed out. Posting that variation directly was rejected by WooCommerce with a message that it is out of stock.
    Green and 40 selected: the price is followed by an Out of stock message and Add to cart is greyed out
    Green + 40 is out of stock: the shopper sees the message instead of a working button.

    For more on the add to cart flow itself see the ultimate guide to adding products to cart in WooCommerce. To show a different product photo for each colour, combine swatches with multiple images per variation. For a plain size attribute, see how to add sizes to products in WooCommerce.

    FAQ

    Can WooCommerce show colour swatches without a plugin?

    Not out of the box: with no swatch plugin active, my test product showed plain dropdowns (first screenshot). You need a plugin or custom code to render colour, image or button swatches.

    Why are my swatches buttons and not colours?

    The attribute’s Type is still Select. With default settings the plugin turned my Select attributes into button swatches (I saw this on both a global attribute and a product-specific custom attribute). Set the type to Color or Image on Products → Attributes and add a colour or image to each term. Colour and image swatches are stored per term, so they only work with global attributes.

    Why is the Add to cart button greyed out?

    It is disabled until every attribute has a selection, and for a combination that is out of stock. Select a swatch in each group, or use Clear and start again.

    Do variation swatches work with the Cart and Checkout blocks?

    Yes in my test: the swatches live on the product page and the chosen attributes were returned by the same Store API the Cart and Checkout blocks use. The product page worked in the Twenty Twenty-Five block theme.

    Are variation swatches free?

    The plugin used here is free on WordPress.org and covered colour, image and button swatches in this guide, with no licence key.

  • How to Set Up Bank Transfer (BACS) Payments in WooCommerce

    To set up bank transfer in WooCommerce, go to WooCommerce → Settings → Payments → Take offline payments → Direct bank transfer → Manage. Tick Enable, add your bank account details and save. Customers then see it at checkout. Orders arrive as On hold; change them to Processing once the money lands.

    Everything below was tested on WooCommerce 11.3.1, WordPress 7.1.5 and the Twenty Twenty-Five theme (December 2026), on both the block checkout and the classic [woocommerce_checkout] shortcode. “BACS” is the name of the gateway in WooCommerce’s code (Direct bank transfer is what customers see). It is built in, so there is nothing to install.

    How to set up bank transfer in WooCommerce (5 steps)

    Step 1: Open the offline payments list

    In wp-admin go to WooCommerce → Settings → Payments, scroll to Take offline payments and click it. You’ll see Direct bank transfer, Check payments and Cash on delivery. Click Manage next to Direct bank transfer.

    WooCommerce Settings, Payments tab, Take offline payments screen listing Direct bank transfer, Check payments and Cash on delivery
    Direct bank transfer lives under “Take offline payments”.

    Step 2: Enable it and write what customers see

    Tick Enable direct bank transfers, then fill in:

    • Title: the name shown at checkout.
    • Description: the text under the option at checkout.
    • Instructions: added to the thank-you page and the customer email. A good place to say which reference to use.
    • Enable for shipping methods: leave empty for all, or pick the shipping methods this option is limited to (the field’s own help text: “Select shipping methods for which this payment method is enabled”).
    • Accept for virtual orders: ticked by default; untick it if you only want bank transfer on orders that ship.
    Direct bank transfer settings with the enable checkbox, title, description and instructions fields
    The default title and description work as they are; the instructions field is empty until you add some.

    Step 3: Add your bank account

    Under Account details click + Add account and enter the account name, account number and bank name, plus the sort code or routing number, IBAN and BIC if they apply to you. The table lists account name, details and bank name. Then click Save changes. You can add several accounts (for example one per currency); each is printed on the thank-you page and in the email.

    Account details table in the Direct bank transfer settings with one bank account filled in
    One saved account. These are demo details, not a real account.

    Step 4: Check it at checkout (block and classic)

    Add a product to the cart and open the checkout. With the block checkout, Direct bank transfer is listed under Payment options:

    Block checkout showing Direct bank transfer under Payment options
    Block checkout.

    The classic checkout (a page using the [woocommerce_checkout] shortcode) shows the same option with your description underneath:

    Classic checkout with Direct bank transfer selected and its description shown below
    Classic checkout.

    After the customer clicks Place order, they land on the order-received page with your instructions and bank details. The same details go in their order email:

    Order received page for a bank transfer order showing the instructions text and the store's bank details
    The final result for the customer. With a US billing address the sort code field is labelled “Routing number”.

    Step 5: Mark the order as paid when the money arrives

    WooCommerce can’t see your bank account, so every bank transfer order is created as On hold. Check your bank statement for the order number, then open WooCommerce → Orders and the order. The status shows On hold:

    Edit order screen with the status set to On hold
    A new bank transfer order, waiting for payment.

    Open the Status dropdown, choose Processing (paid, ready to ship) and click Update. Choose Completed instead if there is nothing to ship, or once it has shipped.

    Order status dropdown open, listing Pending payment, Processing, On hold, Completed and other statuses
    Pick Processing once the payment has cleared.

    The order notes record the whole flow (in my test: “Awaiting BACS payment”, the stock reduction, then “Order status changed from On hold to Processing”). Processing also sends the customer their usual “Processing order” email.

    Order notes for a bank transfer order: awaiting BACS payment, stock reduced, then status changed from On hold to Processing
    Order notes, newest first.

    The bank transfer order status flow

    1. Customer places the order: WooCommerce sets it to On hold with the note “Awaiting BACS payment” and sends the customer an “Order on-hold” email (with your bank details) and you a “New order” email.
    2. You see the money in your bank: change the status to Processing.
    3. You ship (or deliver the download): change it to Completed.

    The Orders list shows the three states side by side; the On hold link at the top filters to the orders still waiting for money:

    Orders list: one order On hold, one Processing and one Completed, with the On hold filter outlined
    On hold, Processing and Completed in the Orders list.

    FAQ

    Why does the bank transfer order stay On hold?

    On purpose. The gateway only sets the order to On hold and waits; nothing in WooCommerce checks your bank. You move it to Processing yourself (Step 5).

    Does the stock get reduced before the customer pays?

    Yes, if the product manages stock. In my test an order of a product with 10 in stock went to On hold and the note “Stock levels reduced (10→8)” appeared immediately for a quantity of 2. That keeps the items reserved while you wait for the transfer.

    Are unpaid bank transfer orders cancelled automatically?

    No. WooCommerce’s “hold stock” timer cancels orders whose status is Pending payment (I checked the query in the WooCommerce source: it selects only the pending status). Bank transfer orders are On hold, so they stay until you cancel them. Review the On hold filter regularly and set unpaid, old orders to Cancelled to release the stock.

    Why doesn’t Direct bank transfer show at checkout?

    • It isn’t enabled (Step 2) or you forgot to save.
    • “Enable for shipping methods” has entries, and the customer chose a different shipping method.
    • The cart is all virtual products and “Accept for virtual orders” is unticked.

    Why don’t my bank details appear on the thank-you page?

    Only filled-in fields are printed, and only if at least one account has some details. Make sure the account row is saved in the Account details table. If the customer says they never got the email, see fixing WooCommerce not sending emails.

    Why is the field called “Routing number” (or BSB, IFSC) instead of sort code?

    It’s one stored field with a label that changes with the customer’s billing country. In my test a US customer saw “Routing number”. WooCommerce’s source relabels it for Australia (BSB), Canada (Bank transit number), India (IFSC), Italy (Branch sort) and New Zealand (Bank code); other countries see “Sort code”.

  • How to Customize WooCommerce Emails: Logo, Colours, Text and Templates (2026)

    To customize WooCommerce emails, go to WooCommerce > Settings > Emails. Set your logo, header alignment, font, footer text and colour palette, then click Manage on an email to change its subject, heading and extra text. For layout changes, copy the template into your child theme’s woocommerce/emails folder and edit the copy.

    Everything below was tested on WooCommerce 11.3.1, WordPress 7.1 and the Twenty Twenty-Five theme with a child theme (December 2026). The screenshots come from that site, using the Processing order email as the example.

    How to customize WooCommerce emails (8 steps)

    Step 1: Open the Emails settings

    Go to WooCommerce > Settings > Emails. The top of the page lists every email WooCommerce sends. Click Manage on one to edit that email only. The sections below the list apply to all emails.

    How to Customize WooCommerce Emails: Logo, Colours, Text and Templates (2026) 1 Settings > Emails list of notifications with the Manage button for Processing order outlined”/>
    The email list. Each row has its own Manage button.

    Step 2: Set the sender name and address

    Scroll to Email sender options. The “From” name and address are what customers see in their inbox. You can also tick Add “Reply-to” email to send replies to a different address.

    Email sender options with the From name and From address fields outlined
    The “From” name and “From” address fields.

    If these emails never arrive, that’s a delivery problem, not a design one. See the fix for WooCommerce not sending emails.

    Step 3: Add your logo, set the header alignment, font and footer

    Under Email template:

    • Logo: upload an image. With no logo, WooCommerce prints your site title instead.
    • Logo width (px): defaults to 120.
    • Header alignment: Left, Center or Right.
    • Font family: pick from the dropdown. Helvetica is the default.
    • Footer text: accepts the placeholders {site_title}, {site_url}, {store_address} and {store_email}, and <br /> for line breaks.
    Email template settings with the logo, logo width, header alignment, font family and footer text fields
    Logo, header alignment (set to Center here) and footer text.

    Step 4: Change the colours

    The Color palette section has five colours: Accent (buttons and links), Email background, Content background, Heading & text and Secondary text (the footer). I set the accent to #1d4ed8 and the email background to #eef2ff. Next to the heading there is a Sync with theme button, if you’d rather start from your theme’s colours.

    Color palette section with the Accent colour set to #1d4ed8 and the email background set to #eef2ff
    The five palette colours.

    Step 5: Check the live preview, then save

    The Email preview at the bottom shows the result with sample order data. Pick any email from the dropdown, switch between desktop and mobile, or use Send a test email. Click Save changes when you’re happy.

    Email preview showing the Processing order email with a blue logo, centred header and the new heading
    The preview with the logo, centred header and new colours.

    Step 6: Edit the text of a single email

    Back on the email list, click Manage on the email you want. Each email has a Subject, an Email heading and Additional content (shown below the order details). The subject and heading take placeholders such as {site_title} and {order_number}. I changed the subject to Thanks, we have your {site_title} order #{order_number} and the heading to “Your order is in!”.

    Processing order email settings with the subject, email heading and additional content fields outlined and filled in
    Subject, heading and additional content for the Processing order email.

    The sentences in the body (“Just to let you know, we’ve received your order…”) are not settings. To change those, you need a template override (steps 7 and 8).

    Step 7: Copy the template into your child theme

    Make sure a child theme is active first. Editing a parent theme works, but the change is lost on the next theme update. At the bottom of the email’s Manage page, the HTML template section shows the file path and a Copy file to theme button. It copies the template into the active theme.

    HTML template section for Processing order with the Copy file to theme button outlined and the theme path bc-email-child/woocommerce/emails/customer-processing-order.php
    Click Copy file to theme. My child theme is called bc-email-child.

    After the click, the section changes: it says the template has been overridden and shows a Delete template file button in place of Copy file to theme.

    HTML template section after copying: it says the template has been overridden by the theme and shows the file path
    The template now lives in bc-email-child/woocommerce/emails/customer-processing-order.php.

    You can also copy files by hand: every file in wp-content/plugins/woocommerce/templates/emails/ can be copied to your-child-theme/woocommerce/emails/ with the same file name.

    Step 8: Edit the copy

    Open customer-processing-order.php in your child theme. I added one line after the “Here’s a reminder of what you’ve ordered” paragraph:

    <p><?php esc_html_e( 'We pack every order by hand and ship within 2 business days.', 'bc-email-child' ); ?></p>

    Reload the email preview. The line appears in the Processing order email, and the other emails are untouched. Leave the @version comment at the top of the copied file as it is: it records which version of the plugin’s template you copied, which helps when WooCommerce updates the original later.

    The final result

    Final Processing order email preview: centred blue logo, new heading, new subject line and the extra shipping line added by the child-theme template
    New subject, centred logo, new heading, custom colours and the line added in the child-theme template.

    I also rendered the email through WooCommerce’s mailer on a real order. The new heading, the extra shipping line, the additional content, the logo URL and the footer address were all in the HTML, and the subject read “Thanks, we have your BC Dev order #998”.

    What about the block email editor?

    WooCommerce 11.3.1 contains a Block Email Editor (alpha) feature. In the code it is marked experimental and is not enabled by default, and it was off on my test site. So, today, the settings screen and template overrides in this post are the way to customize emails. When that feature is switched on, the Email template and colour sections above are replaced by the email editor, so check which one your store uses before following the steps.

    Do you need a plugin?

    Not for the steps above. If you want to design emails visually in the WordPress Customizer without touching PHP, Kadence WooCommerce Email Designer is a free option. Its WordPress.org listing says it customizes the design and text of the default WooCommerce templates through the Customizer, with live preview and test emails, and it was last updated in September 2026 with 90,000+ active installs. I did not install it for this post, so I can’t vouch for how it behaves with the new email design in WooCommerce 11.

    FAQ

    How do I add my logo to WooCommerce emails?

    Upload it under WooCommerce > Settings > Emails > Email template > Logo (step 3), then set the width. Without a logo, the site title is used.

    How do I change the footer text of WooCommerce emails?

    Edit Footer text in the same section. It applies to every WooCommerce email. The default is {site_title}<br />{store_address}.

    How do I change the “Just to let you know…” text in the email body?

    That text is in the template file, not in a setting. Use the template override (steps 7 and 8). For a message after the order details, use the Additional content field instead.

    Why don’t my template changes show up?

    The file must be in the active theme at woocommerce/emails/<same-file-name>.php. On the email’s Manage page, the HTML template section should say “This template has been overridden by your theme” and show your path. If it still offers Copy file to theme, WooCommerce isn’t seeing your file. A common cause is a copy in the parent theme while a child theme is active.

    How do I send a test email?

    Use the Send a test email button above the preview. If the test never arrives, see WooCommerce not sending emails.

    Can I send an email to more people, like a second admin?

    Yes. Each email’s Manage page has Cc and Bcc fields. For the admin recipients, see WooCommerce additional email recipients.

  • How to Add, Remove and Edit WooCommerce Checkout Fields

    To add, remove or edit WooCommerce checkout fields: on the Block checkout, use the Address Fields panel to show, hide or require company, address line 2 and phone, and register extra fields with woocommerce_register_additional_checkout_field(). On the Classic checkout, filter woocommerce_checkout_fields. Both methods are below, tested on WooCommerce 11.3.

    Every step and snippet here was run on WordPress 7.1.5 with WooCommerce 11.3.1 (Twenty Twenty-Five theme) in December 2026, and the screenshots come from that test store. If you are still choosing a plugin instead, see our checkout field editor plugin review; this guide is the no-plugin route.

    First: do you have the Block or the Classic checkout?

    The two checkouts store their fields differently, so the right method depends on which one your store uses. Open Pages → Checkout and edit the page:

    • Block checkout: the page is made of WooCommerce blocks (Checkout → Checkout Fields → Contact Information, Shipping Address …). New stores use this one by default.
    • Classic checkout: the page contains a single Shortcode block with [woocommerce_checkout].

    Code written for one checkout is mostly ignored by the other. That is the number one reason a pasted snippet “does nothing” (see the FAQ). Where to put the snippets: a small custom plugin or a code-snippets plugin. Avoid your theme’s functions.php, because a theme update or switch will wipe it.

    Part 1: Block checkout

    Step 1: Show, hide or require company, address line 2 and phone

    WooCommerce has a built-in switch for the three address fields stores change most. No code needed:

    1. Go to Pages → Checkout and click Edit.
    2. Select the Checkout Fields block (open the List View and click it, or click an empty area of the form column).
    3. In the block sidebar open the Address Fields panel.
    4. Switch Company, Address line 2 and Phone on or off. When a field is on, choose Optional or Required.
    5. Click Update.

    This is what the default store looks like: company is hidden, address line 2 is tucked behind the “+ Add apartment, suite, etc.” link, and phone is optional.

    WooCommerce Block checkout shipping address with the default fields: no company field, an add apartment link and an optional phone field
    Block checkout with WooCommerce’s defaults

    After switching Company on and setting it to Required, switching Address line 2 off and setting Phone to Required, the form looks like this: a Company field appears, the apartment link is gone and “(optional)” disappears from Phone.

    WooCommerce Block checkout shipping address after the Address Fields settings: company and phone required, address line 2 removed
    Same form after the Address Fields settings: company and phone required, address line 2 hidden

    Good to know: the panel saves three site options, woocommerce_checkout_company_field, woocommerce_checkout_address_2_field and woocommerce_checkout_phone_field, each set to hidden, optional or required. The Classic checkout reads the same options (we checked: with phone and company set to required and address line 2 hidden, the Classic form followed). You can also set them from the command line, for example wp option update woocommerce_checkout_phone_field required.

    Step 2: Add a custom field to the Block checkout

    Since WooCommerce 8.9 the Block checkout has an official Additional Checkout Fields API. You register a field in PHP and WooCommerce renders it, validates it, saves it with the order and shows it on the order confirmation. The old woocommerce_checkout_fields filter does not work here.

    Add this to your plugin. Register on the woocommerce_init hook:

    add_action( 'woocommerce_init', function () {
    
    	// A text field inside the address form (shows for billing and shipping).
    	woocommerce_register_additional_checkout_field( array(
    		'id'       => 'bc/vat-number',
    		'label'    => 'VAT number',
    		'location' => 'address',
    		'type'     => 'text',
    		'required' => false,
    	) );
    
    	// A select in the "Additional order information" section.
    	woocommerce_register_additional_checkout_field( array(
    		'id'       => 'bc/heard-from',
    		'label'    => 'How did you hear about us?',
    		'location' => 'order',
    		'type'     => 'select',
    		'required' => false,
    		'options'  => array(
    			array( 'value' => 'search', 'label' => 'Search engine' ),
    			array( 'value' => 'friend', 'label' => 'A friend' ),
    			array( 'value' => 'other',  'label' => 'Other' ),
    		),
    	) );
    } );

    The pieces you will change most:

    • id: must be unique and written namespace/name (use your own prefix, like bc/ here).
    • location: contact (next to the email), address (inside the billing and shipping address forms) or order (the “Additional order information” section).
    • type: text, select, checkbox or date (the types WooCommerce 11.3.1 accepts; any other type is rejected).
    • required: set to true to make it mandatory. We tested it: placing an order without a required field is rejected by the checkout, and the same order with the field filled in goes through.

    The text field shows up in the address form, with “(optional)” added to the label automatically:

    WooCommerce Block checkout address form with a custom VAT number (optional) field added by code
    The “VAT number” field registered with location “address”

    And the select appears under Additional order information:

    WooCommerce Block checkout additional order information section with a How did you hear about us select field
    The “How did you hear about us?” select registered with location “order”

    Step 3: See and read the saved value

    We placed a test order through the Block checkout. The values are shown on the order confirmation page without any extra code:

    WooCommerce order confirmation page showing the custom VAT number under the billing and shipping address and the How did you hear about us answer under Additional information
    Final result: both custom fields on the order confirmation page

    In code, the values are stored as order meta. An address field is saved once for billing and once for shipping; an order field is saved once:

    $order->get_meta( '_wc_billing/bc/vat-number' );   // DE123456789
    $order->get_meta( '_wc_shipping/bc/vat-number' );  // DE123456789
    $order->get_meta( '_wc_other/bc/heard-from' );     // search

    What the Block checkout does not let you do with code (yet)

    Core WooCommerce gives you the three address switches from step 1 and the API for new fields. It has no supported way to rename or reorder the fields it ships with. We tried the usual woocommerce_default_address_fields filter (make last name optional, relabel “Address” and “ZIP Code”) and the Block checkout ignored it: last name stayed required and the labels did not change. If you need that on the Block checkout, you have two options:

    • Switch the page to the Classic checkout (next part): edit the Checkout page, remove the Checkout block and add a Shortcode block with [woocommerce_checkout]. Everything in part 2 then applies.
    • Use a field editor plugin that supports the Block checkout. See when a plugin makes sense.

    Part 2: Classic checkout

    The Classic checkout (the [woocommerce_checkout] shortcode) builds its form from one array that WooCommerce passes through the woocommerce_checkout_fields filter. The array has four groups: billing, shipping, account and order. Add, remove or change entries in it and the form follows.

    Step 4: Remove, edit and add fields in one filter

    Put this in your plugin. It does all three jobs, marked 1 to 3:

    add_filter( 'woocommerce_checkout_fields', function ( $fields ) {
    
    	// 1. Remove fields (from billing and shipping).
    	foreach ( array( 'billing', 'shipping' ) as $section ) {
    		unset( $fields[ $section ][ $section . '_company' ] );
    		unset( $fields[ $section ][ $section . '_address_2' ] );
    	}
    
    	// 2. Edit fields: make the phone required, change a label, change a placeholder, move a field.
    	$fields['billing']['billing_phone']['required']   = true;
    	$fields['billing']['billing_first_name']['label'] = 'Your first name';
    	$fields['order']['order_comments']['placeholder'] = 'Gate code, delivery window, gift message…';
    	$fields['billing']['billing_email']['priority']   = 5; // Lower number = higher up the form.
    
    	// 3. Add a field.
    	$fields['billing']['billing_vat'] = array(
    		'type'        => 'text',
    		'label'       => 'VAT number',
    		'placeholder' => 'e.g. DE123456789',
    		'required'    => false,
    		'class'       => array( 'form-row-wide' ),
    		'priority'    => 35,
    	);
    
    	return $fields;
    } );

    How each part works:

    • Remove: unset() the field. The key is the field name, such as billing_company, billing_address_2 or shipping_phone. Remove it from shipping too, or it stays on the shipping form. Do not remove fields that your payment gateway or tax setup needs (country, state, postcode).
    • Edit: every field is an array. Change label, placeholder, required, class (the CSS classes that control width, for example form-row-first and form-row-last for two columns) or priority (the sort order: lower is higher on the page).
    • Add: add a new key. The type can be text, textarea, select, checkbox, radio, email, tel and so on. Name the key with a billing_ or shipping_ prefix and WooCommerce saves it with the order for you (step 5).

    Result on the Classic checkout: email moved to the top, “Your first name” label, a new optional VAT number field after the name, no company or address line 2, and a required phone with a red asterisk.

    WooCommerce Classic checkout billing form after the filter: email first, renamed first name, a new VAT number field, no company or address line 2 fields
    Final result: Classic checkout billing form after the filter (Twenty Twenty-Five theme)

    Step 5: Check that the value is saved and show it

    We placed a test order through WooCommerce’s own checkout code with the snippet active. The new field was saved as the order meta _billing_vat, the order note field kept its text, and the removed fields were not part of the submitted data. No save code is needed for fields prefixed billing_ or shipping_. To show the value on the admin order screen, under the billing address:

    add_action( 'woocommerce_admin_order_data_after_billing_address', function ( $order ) {
    	$vat = $order->get_meta( '_billing_vat' );
    	if ( $vat ) {
    		echo '<p><strong>VAT number:</strong> ' . esc_html( $vat ) . '</p>';
    	}
    } );

    We confirmed that this hook outputs VAT number: DE123456789 for the test order. Always escape saved values with esc_html() when you print them.

    When a plugin makes more sense than code

    Code is the right tool when you need a handful of changes and want zero extra plugins. A plugin is easier when someone non-technical manages the fields, when you want to reorder fields by drag and drop, or when you want to relabel core fields on the Block checkout (which core cannot do, see above).

    Per its WordPress.org listing, the free Checkout Field Editor (Checkout Manager) for WooCommerce by ThemeHigh states “Compatible with Classic & Block Checkout” and supports up to 20 field types on the Classic checkout and 10 on the Block checkout in the free version. We did not test it for this guide. Our plugin review compares the options.

    FAQ

    Why doesn’t my woocommerce_checkout_fields code work?

    Most likely your Checkout page uses the Block checkout, which does not read that filter. Check the page in the editor (see the first section). On the Block checkout use the Address Fields panel and woocommerce_register_additional_checkout_field(); or switch the page to the [woocommerce_checkout] shortcode. The other common cause is a snippet pasted into a theme’s functions.php that is no longer the active theme.

    How do I remove the phone field from WooCommerce checkout?

    On the Block checkout, switch Phone off in the Address Fields panel (or run wp option update woocommerce_checkout_phone_field hidden). On the Classic checkout, unset( $fields['billing']['billing_phone'] ) in the filter from step 4, or use the same option.

    How do I make a checkout field required or optional?

    Company, address line 2 and phone: the Address Fields panel (Block) or the same options (Classic). Your own fields: 'required' => true in the field definition, in both the Block API and the Classic filter.

    How do I add a custom field to the Block checkout without a plugin?

    Register it with woocommerce_register_additional_checkout_field() on woocommerce_init, as in step 2. It needs WooCommerce 8.9 or newer. The core API supports text, select, checkbox and date fields.

    Where is the custom checkout field data saved?

    As order meta. Classic fields named billing_xxx or shipping_xxx are saved as _billing_xxx or _shipping_xxx. Block fields are saved as _wc_billing/your/id, _wc_shipping/your/id (address fields) or _wc_other/your/id (contact and order fields).

    Can I remove the coupon field or a shipping option from checkout too?

    Those are not form fields. See how to hide the coupon prompt on the checkout page and how to disable a shipping method.