How Can I Add Custom Fields To My WooCommerce Checkout Form?

person using laptop computer holding card

Adding custom fields to your WooCommerce checkout form can help you gather important information from customers, such as their phone number or preferred delivery date. This article will guide you through the process of adding custom fields to your WooCommerce checkout form.

Load WooCommerce Stores in 249ms!

Why add custom fields?

Custom fields offer an opportunity to collect extra information from your customers. The default WooCommerce checkout page includes basic fields like name and address, but adding custom fields lets you ask designated questions, which can vary by store. For instance, a store that sells t-shirts can add a custom field for t-shirt size.

How to add custom fields

There are different approaches to adding custom fields to the WooCommerce checkout form. You can:

  1. Use a plugin: Several WooCommerce plugins allow you to add custom fields to checkout, including Checkout Fields Manager and Custom Checkout Fields.

  2. Code custom fields: If you’re comfortable with code, you can add custom fields manually. Just like WooCommerce templates, you can create a file called checkout.php and add it to your theme files. Then use code to create custom fields.

OPTION 1: Use a plugin

Using a plugin to add custom fields to the WooCommerce checkout page is the easiest method. Here are some of the plugins:

1. Checkout Field Editor

The Checkout Field Editor plugin is a free and user-friendly plugin that helps you add custom fields to your WooCommerce checkout page. It has a drag-and-drop interface and offers the following features:

  • Add, remove, and edit fields
  • Customize field labels
  • Add validation rules
  • Show or hide fields based on the cart items and their prices

To use the plugin:

  1. Download and install the plugin from the WordPress plugin repository.
  2. Activate the plugin from the WordPress dashboard.
  3. Navigate to WooCommerce > Checkout Fields to make changes to your checkout fields.

2. WooCommerce Extra Product Options

WooCommerce Extra Product Options is a premium plugin that allows you to create extra product options. Though the plugin is not strictly for adding custom fields to the checkout page, it includes the option to add fields to the checkout page. Some of its features include:

  • Add fields to the checkout page
  • Supports conditional logic
  • Ability to charge extra for options
  • Compatible with different types of fields, including checkboxes, date pickers, color pickers, and more.

To use the plugin:

  1. Purchase the WooCommerce Extra Product Options plugin.
  2. Download and install the plugin from the WooCommerce website.
  3. Navigate to Products > Extra Product Options to start adding custom fields.

OPTION 2: Code custom fields

Adding custom fields to the WooCommerce checkout form using code requires some code knowledge. The following are the steps to follow.

  1. Create a file called checkout.php: In your theme files, create a file called checkout.php. (Find out about WooCommerce template file structure and how to override WooCommerce templates).

  2. Add fields using code: In the checkout.php file, you can use code to add fields.

add_filter(‘woocommerce_checkout_fields’, ‘add_custom_checkout_field’);

function add_custom_checkout_field( $fields ) {

$fields[‘billing’][‘billing_phone_number’] = array(

‘label’ => __( ‘Phone Number’ ),

‘required’ => true,

‘class’ => array(‘form-row-wide’),

‘clear’ => true


return $fields;


In the code above, we’re adding a custom field for phone number to the billing section of the checkout form.

  1. Save changes and customize: Save the updated checkout.php file, and then customize the field’s label, required status, and CSS class among other things.


Custom fields can be a valuable addition to your WooCommerce checkout form, giving you more control over the information you collect from your customers. You can use plugins like Checkout Field Editor or WooCommerce Extra Product Options to add custom fields to your checkout page, or use code to create them yourself. By following the steps outlined above, you’ll be able to create a custom checkout page tailored to meet your store’s specific needs.

Scroll to Top