in

Add a Custom Delivery Instructions Field to Your WooCommerce Checkout

A WooCommerce custom checkout delivery instructions field lets customers share helpful details, such as gate codes or safe-drop preferences. Add a snippet to place the field where it fits your checkout, save responses with each order, and show them to staff. Then test validation, order emails, and checkout compatibility before launch.

Giving customers a simple way to share delivery preferences can make every order smoother. A WooCommerce custom checkout delivery instructions field lets shoppers add helpful details, such as where to leave a package or how to reach their door, before they place an order.

In this guide, you’ll learn how to add the field to your WooCommerce checkout with a straightforward snippet. It’s a practical way to collect useful delivery notes and help your team prepare orders with confidence.

Why Add a WooCommerce custom checkout delivery instructions field?

A small detail can make the difference between a smooth handoff and a missed delivery. Giving shoppers a clear place to explain their preferences helps your team act on useful information without making checkout feel complicated.

First, consider the kinds of practical details customers may want to share and how a dedicated field can make those notes easier to use.

Help customers share useful delivery details

Customers may know things about their property that a shipping address can’t tell you. A short note can point out a side entrance, a preferred safe place, or a gate code that helps the courier reach the right spot.

A clearly labeled delivery instructions field also sets expectations: customers can add delivery-related details without using the field for unrelated requests. Helpful examples might include:

  • “Please leave the parcel inside the porch.”
  • “Use the entrance on Oak Street; the front door faces the courtyard.”
  • “Call on arrival—the doorbell is out of order.”

Keep in mind that these notes are requests, not guarantees. Delivery partners may not be able to follow every instruction, so avoid promising a particular outcome. A focused field also makes it easier for staff to spot relevant notes when preparing or fulfilling an order.

Once you know what information you want to collect, its position on the checkout page can influence whether customers notice it and provide a useful answer.

Choose the best place for the field at checkout

Placement should follow the customer’s decision-making flow. Positioning the field near the shipping address makes its purpose apparent, since shoppers are already thinking about where the parcel is going. A concise label such as “Delivery instructions” is usually clearer than a generic “Notes” label.

If your checkout already includes an order-notes box, a separate field can distinguish courier guidance from other requests. That separation is especially useful when staff review orders, because delivery details are less likely to be mixed in with gift messages or product questions.

Before settling on a location, check how it appears on both desktop and mobile, and consider whether it should be optional. A sensible setup should:

  • Keep the field close to shipping details without crowding the form.
  • Use a short placeholder to show the kind of note that helps.
  • Allow customers to leave it blank when they have no special instructions.

With the purpose and placement settled, you can add the field in a way that fits your checkout experience and makes the information straightforward to find later.

Add the WooCommerce custom checkout delivery instructions field with a snippet

With the field’s purpose and placement decided, the next step is connecting it to your checkout and order records. The snippet below adds an optional text area to the classic WooCommerce checkout and saves the customer’s note to the order.

Add and customize the checkout field

This example places the field near the order notes, then shows the saved instructions in the shipping section of the order in your dashboard. It’s designed for the classic checkout; WooCommerce Checkout Blocks use a different integration approach, so test your checkout type before adding the code.

Add the snippet as one piece, then adjust the label or placeholder to suit your store. The field is optional, and the text-area input is sanitized before it is saved.

addaction( 'woocommerceafterordernotes', 'myshopdeliveryinstructionsfield' );
function myshopdeliveryinstructionsfield( $checkout ) {
    woocommerceformfield( 'deliveryinstructions', array(
        'type'        => 'textarea',
        'class'       => array( 'form-row-wide' ),
        'label'       => ( 'Delivery instructions', 'myshop' ),
        'placeholder' => ( 'Add a note for the delivery team (optional)', 'myshop' ),
        'required'    => false,
    ), $checkout->getvalue( 'deliveryinstructions' ) );
}
addaction( 'woocommercecheckoutupdateordermeta', 'myshopsavedeliveryinstructions' );
function myshopsavedeliveryinstructions( $orderid ) {
    if ( isset( $POST['deliveryinstructions'] ) ) {
        updatepostmeta(
            $orderid,
            'deliveryinstructions',
            sanitizetextareafield( wpunslash( $POST['deliveryinstructions'] ) )
        );
    }
}
addaction( 'woocommerceadminorderdataaftershippingaddress', 'myshopshowdeliveryinstructions' );
function myshopshowdeliveryinstructions( $order ) {
    $instructions = $order->getmeta( 'deliveryinstructions' );
    if ( $instructions ) {
        echo '<p><strong>' . eschtml( 'Delivery instructions:', 'myshop' ) . '</strong> ' .
            eschtml( $instructions ) . '</p>';
    }
}

Change “Delivery instructions” or the placeholder text directly in the code if you want different wording. Keep the meta key consistent wherever you reference it, so the note is saved and retrieved under the same name.

Before adding custom code, choose a place where it can be maintained and tested without risking your live checkout. A little preparation makes troubleshooting easier if your theme or another plugin changes checkout behavior.

Place the snippet safely in your store

A snippets plugin is a practical choice because it keeps custom functionality separate from theme files. Alternatively, add the code to your child theme’s functions.php file; avoid editing the parent theme, since an update can overwrite your changes.

  • Back up your site, then test the field on a staging site when possible.
  • Place an order with a sample note and confirm it appears in the order dashboard.
  • Check checkout on mobile and verify orders still submit when the field is blank.

If the field doesn’t appear, confirm that your store uses classic checkout and check for a PHP error or a conflict with another checkout customization. Once testing is complete, customers can enter their note and your team can find it alongside the order’s shipping details.

Save and test delivery instructions across the order journey

A note is only useful if it stays attached to the right order and reaches the people who need it. A few checks now can confirm that the information is stored, visible to staff, and handled as expected during checkout and order updates.

Store instructions with the order and display them to staff

The earlier snippet saves the note as order metadata and displays it beneath the shipping address in the dashboard. When checking a test order, confirm the text is readable and attached to the correct order—not just visible in the checkout form.

If your store has enabled High-Performance Order Storage (HPOS), use WooCommerce’s order methods to save metadata rather than writing directly to the database. You can replace the snippet’s save action and function with this version; don’t run both save callbacks:

addaction( 'woocommercecheckoutcreateorder', 'myshopsavedeliveryinstructions', 10, 2 );
function myshopsavedeliveryinstructions( $order, $data ) {
    if ( isset( $POST['deliveryinstructions'] ) ) {
        $order->updatemetadata(
            'deliveryinstructions',
            sanitizetextareafield( wpunslash( $POST['deliveryinstructions'] ) )
        );
    }
}

This uses WooCommerce’s order API, while the existing display callback can continue retrieving the value with $order->get_meta(). Check the note in the order dashboard after placing a test order, and make sure staff can distinguish it from general order notes.

Check validation, emails, and checkout compatibility

Because the field is optional, customers should be able to submit checkout with it blank. Test both an empty field and a note containing line breaks or punctuation; sanitization should preserve a readable message while removing unsafe input.

Order metadata does not automatically appear in customer or admin emails. If staff rely on email notifications, add a suitable email display hook or another tested integration, then place a test order and check the email actually received. Keep the output escaped, and avoid including sensitive access details in messages sent to customers.

Finally, verify the setup in the checkout experience your store uses. This snippet targets classic checkout; Checkout Blocks may require a different integration. A quick test checklist can help:

  • Submit an order with a note and one without.
  • Confirm the note appears on the correct order and in any intended emails.
  • Repeat on mobile and check that checkout completes without errors.

Once those checks pass, the field is ready to collect useful delivery preferences without interrupting the ordering process.

Make delivery preferences easier to capture and act on

A WooCommerce custom checkout delivery instructions field gives customers a clear place to share practical delivery details—and helps your team find those notes alongside the order. With thoughtful placement, concise wording, and an optional field, you can collect useful guidance without adding friction to checkout.

The snippet is a straightforward starting point, but a reliable setup depends on testing the full order journey. Confirm that notes save to the correct order, appear where staff need them, and behave as expected with your checkout type, order storage, and email workflow. Once everything checks out, customers can share helpful preferences with confidence, and your team can handle each order with greater clarity.

Leave a Reply

Your email address will not be published. Required fields are marked *

      Written by Maeve Rodriguez

      Maeve is a Business Content Writer and Front-End Developer. She's a versatile professional with a talent for captivating writing and eye-catching design.