How to enable WooCommerce order search by custom metadata like serial numbers

Improving the admin experience in WooCommerce is a common need, especially for stores with high order volumes. One specific request involved enabling search functionality within the WordPress dashboard to locate orders by serial numbers manually entered as metadata. Here’s how Freshy solved that challenge.

Issue background

A WooCommerce store owner needed a way to search for orders using manually added serial numbers. These numbers were stored in custom order meta fields but weren’t searchable through the default WooCommerce order search interface in the WordPress admin.

Initially, attempts to use the native search field (e.g., searching “serial number 131003846”) returned no results, despite the metadata being attached to the relevant order.

Diagnosis

The root of the issue was that WooCommerce’s default search only includes limited order fields—such as order ID, customer name, or email—excluding most custom metadata. Even correctly formatted serial number searches would yield no matches unless specifically mapped.

Resolution steps

  1. Tested default and bracketed input
    Tried queries like serial number [131003846], which failed due to lack of metadata mapping.
  2. Removed brackets and re-tested
    Simple searches like serial number 131003846 worked only in some cases, depending on which metadata field the search engine queried.
  3. Mapped all relevant meta keys
    Developers identified multiple metadata fields used for storing serial numbers. They ensured all relevant meta keys were indexed for admin search.
  4. Verified working implementation
    After mapping all fields, a search for serial number 131003846 returned the correct order, confirming successful implementation.
  5. Recommended a plugin for enhanced UX
    During troubleshooting, the team discovered the Dashify plugin, which improves the WooCommerce admin experience. It wasn’t necessary for this fix but was noted as a useful enhancement for Woo-heavy sites.

Final outcome

The WooCommerce order search was updated to support searching by custom serial number metadata, resolving the issue. The client confirmed that this was exactly what they needed.

If you’re looking to enhance your WooCommerce store’s backend functionality, contact Freshy for expert solutions tailored to your workflow.