The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · PHP

Add a Custom Checkout Field in WooCommerce

Shared by Amit Dholiya · September 2, 2026 · @woocommerce_checkout_fields

18 views
1 upvote
Back to Snippets

You can add your own field to the WooCommerce checkout page, such as Delivery Instructions, Company Name, or GST Number.

Steps

  1. Open your theme’s functions.php file.
  2. Add the code below.
  3. Save the file.
  4. Open the WooCommerce Checkout page.

Done — a new Delivery Instructions field will appear in the checkout form.

function add_delivery_instructions_field( $fields ) {

    $fields['billing']['delivery_instructions'] = array(
        'type'        => 'textarea',
        'label'       => 'Delivery Instructions',
        'placeholder' => 'Enter any special delivery instructions',
        'required'    => false,
        'class'       => array( 'form-row-wide' ),
        'priority'    => 120,
    );

    return $fields;
}

add_filter(
    'woocommerce_checkout_fields',
    'add_delivery_instructions_field'
);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments