GoDaddy Help

WooCommerce admin custom order fields

The Admin Custom Order Fields extension lets you add fields to existing orders such as notes, dates, or other relevant details. By default, the extra fields are only displayed to site administrators, but can be included in the customer's My Order page if needed.

Required: WooCommerce Admin Custom Order Fields is a premium WooCommerce extension included with Managed WordPress Ecommerce, Managed WooCommerce Stores or as a standalone purchase.

Setup and configuration

Installation

  1. Sign in to WordPress.
  2. From the left-hand menu, go to WooCommerce and click on Extensions.
  3. From the GoDaddy Included Extensions list, scroll to Admin Custom Order Fields and click on Install.

After installation, refer to WooCommerce in the left side menu and select Custom Order Fields to begin adding custom fields.

Adding custom order fields

  1. Click on Add Field.
  2. Set the Label you want shown for the field in the order details.
  3. Set a Description. This is displayed to users when hovering over the question mark (?) icon.
  4. Select a field Type:
    • Text: Short string of text for the field.
    • Text Area: Long string of text for the field.
    • Radio: A list with radio buttons to select one of multiple options.
    • Select: Drop-down menu to select one of multiple options.
    • Checkbox: A list with checkboxes for selecting one or more options.
    • Multiselect: Creates a field to select one or more options.
    • Date: Pop-up calendar to select a date.
  5. Depending on the field type, set the Default and Values.
    Note: This is required for Select, Radio, Multiselect and Checkbox field types.
    • Separate multiple values with a vertical pipe | (e.g. value1|value2|value3).
    • To set a default value, place a double asterisk ** before and after the value.
  6. Set Attributes to determine where the field will be seen and whether it's utilized in sorting and filtering.
    • Required: Adds a red asterisk to the field to denote that it should be completed. This is simply a visual cue and is not required to save or complete an order.
    • Display in View Orders Screen: Adds the field to the Orders Dashboard so you can view the information all in one screen.
    • Allow Sorting on View Orders Screen: Allows you to sort orders alphabetically or numerically based on the field value.
      Note: Multiselect and Checkbox field types cannot be used for sorting.
    • Allow Filtering on View Orders Screen: Allows you to filter and view specific orders based on the field value.
    • Show in My Orders/Email: Displays to the customer on their My Orders page or in emails.
  7. Click on Save Fields.

While no general settings exist for Admin Custom Order Fields, the fields you create will each have options you can set.

Back To Top

Import and export

Custom order fields can be imported and exported from orders, as they're stored as order metadata. While many importers and exporters can include order meta (post meta), here are some plugins that have dedicated compatibility added for Admin Custom Order Fields, with no action or custom code needed from the merchant.

Customer / Order / Coupon Export (CSV)

Using the Customer / Order / Coupon Export extension will allow you to add the custom order fields to your order CSV custom formats and will be automatically included in any built-in formats as new columns.

  • Custom format: Add a custom field by using the unique field ID to search admin_custom_order_field_{fieldID} and name the columns accordingly.
  • Default or built-in format: Custom order fields are automatically added as columns in your CSV order export with a new column for each admin custom order field in the exported CSV.

Customer / Order / Coupon Export (XML)

When using the Customer / Order / Coupon Export extension for XML exports, exported order data is automatically added in a dedicated XML tag for the Default or Legacy formats, and can be optionally included in any custom formats.

  • Custom format: To include custom field data when creating a custom XML format, be sure to add AdminCustomOrderFields as a data source, then set a name for the tag/wrapper that will be used.

  • Default or Legacy formats: A <CustomFields> wrapper is added to the XML output for default formats. This wrapper will contain a <CustomField> element for each field that's part of the order and will output the field ID, admin name, and value for each field in the element.

An example of expected XML output:

<CustomFields>
  <CustomField>
    <ID>field ID</ID>
    <Name>field admin name</Name>
    <Value>field input received for this order</Value>
  </CustomField>
</CustomFields>

CSV import compatibility

While the Admin Custom Order Fields extension is not fully compatible with the Customer / Coupon / Order CSV Import Suite, most data can easily be imported.

The meta keys for each custom order field use a format of _wc_acof_{id}, where {id} is replaced by the integer id of the field, which is clearly visible next to the label of each field you create. So, by titling your columns with a format of meta:_wc_acof_{id}, all field values (except for Multiselect and Checkbox field types) can be easily imported.

Note: A Multiselect or Checkbox field can only be imported this way when an order contains only one selected value for the field.
Back To Top

More info

Share this article