WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. knowlton
    Member
    Posted 8 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!

    http://wordpress.org/plugins/woocommerce/

  2. knowlton
    Member
    Posted 8 months ago #

    any insights?

Reply

You must log in to post.

About this Plugin

About this Topic