Create a customer search filter on the woocommerce order page -


how can create client search filter on woocommerce order page?

example: search customer zip code or find customer phone number

to list customer orders

the woocommerce order admin allows search ordres following fields:

  • order key
  • billing first name
  • billing last name
  • billing company
  • billing address 1
  • billing city
  • billing postcode
  • billing country
  • billing state
  • billing email
  • billing phone
  • order items

if need search order field add functionality plugin or themes functions.php file:

add_filter( 'woocommerce_shop_order_search_fields', 'woocommerce_shop_order_search_order_total' ); function woocommerce_shop_order_search_order_total( $search_fields ) {     $search_fields[] = '_order_total';     return $search_fields; } 

with simple snippet active can search order total. using technique can search custom post meta may adding order records.

credit skyverge docs on this


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -