Ready to get started?Download WordPress


WooCommerce - excelling eCommerce
Search orders by item order meta (2 posts)

  1. knowlton
    Posted 9 months ago #

    I have downloadable products in my Woocommerce store that have associated serial numbers which I store in the 'wp_woocommerce_order_itemmeta' table. My customer service folks need to be able to search by serial number and bring up the order that has the product with the searched-for serial number. I tried this in my functions.php file:

    add_filter( 'woocommerce_shop_order_search_fields', 'woocommerce_shop_order_search_licensecodes' );
    function woocommerce_shop_order_search_licensecodes( $search_fields ) {
      $search_fields[] = '_licensecode';
      return $search_fields;

    but I am not getting any results when I search for the serial number. Any ideas what I can do to make this custom search work? Thanks!


  2. knowlton
    Posted 9 months ago #

    any insights?


You must log in to post.

About this Plugin

About this Topic