How to Add Custom Fields in WooCommerce Checkout Page

WooCommerce Checkout Fields Manager

If you are operating an online business, you are likely aware of the importance of a well-designed and functional checkout page. Occasionally, you may find the need to customize your eCommerce website to accommodate specific requirements. Adding custom fields to the WooCommerce checkout page can greatly enhance the user experience and provide valuable information for both the store owner and the customer.

In this tutorial, we will guide you through the process of customizing the WooCommerce checkout page and adding additional fields to it. By following these steps, you will be able to tailor the checkout experience to suit your business needs and provide a seamless and personalized journey for your customers.

Add Custom Fields in WooCommerce Checkout Page – 2 Methods

There are two methods by which you can add Custom Fields in WooCommerce Checkout Page.

  1. Add Custom Fields using Checkout Fields Manager by Addify
  2. Add Custom Fields in WooCommerce Checkout Page Programmatically

Method#1: WooCommerce Checkout Fields Manager by Addify

Checkout Fields Manager is a powerful plugin that allows you to customize and add extra fields to your WooCommerce checkout page, enabling quick order processing and enhanced customer experience. With support for various field types such as dropdowns, radio buttons, text, file uploads, and more, you can collect any type of information from your customers using edit checkout fields WooCommerce.

Features: 

  • Add custom fields to the checkout page
  • Assign fields to specific products
  • Display fields in 15 pre-defined positions
  • Make fields optional or mandatory
  • Customize default billing and shipping fields
  • Dedicated VAT field with validation
  • Role-based restriction for field display
blank

Installation

Please follow the steps mentioned below to download the plugin:

  1. Download the .zip file from your WooCommerce account.
  2. Go to: WP Admin > Plugins > Add New and Upload Plugin. Select Choose file for the file you have downloaded.
  3. Click on Install Now to Activate the plugin and get started.

Setup and Configuration

After activating the WooCommerce Checkout Fields Manager by Addify, you can view the option of “Checkout Fields” under the WooCommerce menu in the WordPress admin panel. 

To access the general settings of the plugin, go to WooCommerce > Settings > Checkout Fields. The configurations of the plugin will appear here.

Add Extra Checkout Fields

To add new checkout fields in WooCommerce, follow these steps:

  • Go to your WordPress dashboard and navigate to “WooCommerce” in the sidebar.
  • Click on “Checkout Fields” under the “WooCommerce” menu.

This will take you to the “Checkout Fields” settings page, where you can customize the fields. Here are the available customizations:

  • Add a new field title and label to display at checkout
  • Select field sorting order and status
  • Set field pricing 
  • Display fields when selected products, categories, and tags are in the cart
  • Choose from 19 field types
  • Option to make the field mandatory for customers
  • Show field in WP-admin user detail page
  • Set field width to full or half 
  • Set an optional placeholder text that will be displayed inside the field
  • Add a field description and custom CSS class
  • Set a condition to display or hide field based on user roles
  • Choose from 15 display positions
blank

Field Positions on Checkout Page

To customize the field positions on the checkout page in WooCommerce, you can choose from the following 15 pre-defined positions:

  • Before or After Customer Details
  • Before or After the Billing Form
  • Before or After the Shipping Form
  • Before or After Terms and Conditions
  • Before or After the Order Review
  • Before or After the Order Notes
  • Before or After Order Submit button
  • Before Order Review heading
blank

Restrict Fields by User Roles

Restrict Fields in WooCommerce edit the checkout page based on user roles by assigning fields to specific user roles. This ensures that the fields only appear for the designated user roles, keeping the checkout page clean and displaying fields only when needed. Here are two available positions for restricting fields based on user roles:

  • Before or after the Terms and Conditions
  • Before or after the Order Submit Button
blank

Dependable Fields

When creating a new field in WooCommerce, you can make it dependent on other fields. This feature ensures the field is displayed only when a relevant previous field value is selected. By utilizing this functionality, you can keep the checkout page clean and show fields dynamically based on customer selections.

blank

Field Price

You can set the price for a field in WooCommerce as a fixed amount or a percentage.

blank

Google ReCaptcha Field Keys

Add Google reCaptcha keys by navigating to WooCommerce > Settings > Checkout Fields > Google reCaptcha.

blank

Managing Default Shipping and Billing Fields

Go to WooCommerce > Settings > Checkout Fields > Fields Titles. The customizations that can be done are:

  • Manage and customize default billing and shipping field labels at checkout. 
  • Show/hide billing and shipping fields based on user roles
  • Change the sorting order of billing and shipping fields based on user roles
blank
blank

Select from 19 Different Field Types

The WooCommerce Custom Fields Checkout plugin supports 19 field types to choose from. These include:

  • Text
  • Text area
  • Email
  • Select box
  • Multi-select box
  • File Upload (New)
  • Checkbox
  • Multi-checkbox
  • Radio button
  • Number
  • Password (secret input field)
  • Color picker
  • Date picker (calendar)
  • Time picker
  • Google ReCAPTCHA
  • Heading
  • Message
  • VAT with validation
  • Description (message display only)
blank

Support for VAT VIES Validation

WooCommerce Checkout Field Editor comes with 2 types of VAT validation:

  • VAT Number Length
  • VIES Validation
blank

Understanding the Priorities

Rule-Based Management

  • Add a custom field for selected products
  • Add a custom field for selected categories
  • Add a custom field for selected tags
  • Apply custom field for selected user roles
blank

Method#2: Add Custom Fields in WooCommerce Checkout Page Programmatically

The second method to add custom fields in WooCommerce checkout page is through a program-based implementation.

<p class="form-row form-row-wide">

    <label for="billing_Name"><?php esc_html_e( 'Name', 'af_checkout_fields' ); ?> <span class="required">*</span></label>

    <input type="text" class="input-text" name="billing_Name" id="billing_Name" value="<?php echo esc_attr( $_POST['billing_Name'] ?? '' ); ?>" required />

</p>

// Add custom field to checkout form data

function af_checkout_fields( $fields ) {

    $fields['billing_Name'] = array(

        'label'       => __('Name', 'af_checkout_fields'),

        'placeholder' => _x('Name', 'Please enter valus', 'af_checkout_fields'),

        'required'    => true,

        'class'       => array('form-row-wide'),

        'clear'       => true,

    );

    return $fields;

}

add_filter('woocommerce_checkout_fields', 'af_checkout_fields');

Final Note

We appreciate your interest in learning about how to add custom fields to the WooCommerce checkout page using the WooCommerce Checkout Fields Manager plugin. We hope that this guide has provided you with valuable insights into this process. 

If you have any additional questions or need further assistance, please don’t hesitate to reach out to our dedicated support team. They are available to address any queries or concerns you may have.

blank

Kim Parsons

Kim Parsons is outreach specialist and technical writer at Addify. When it comes to writing his main areas of interest are web and ecommerce development. Apart from writing his interests include watching Netflix and playing baseball in his backyard.

Join our newsletter


    Subscribe to Our Newsletters.

    Be the first to get an exclusive offer and the latest news.