Title: API: Filter orders by custom field
Last modified: January 2, 2020

---

# API: Filter orders by custom field

 *  Resolved [libelle11](https://wordpress.org/support/users/libelle11/)
 * (@libelle11)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/api-filter-orders-by-custom-field/)
 * Hello Community,
 * I retrieve orders from WooCommerce using the WordPress API. WordPress and Woo
   are up to date. The retrieval takes place via “/wp-json/wc/v3/orders”.
 * Now I want to filter the retrieval of these orders by a custom field (which is
   also displayed below “meta_data”). The parameter “?filter” has not been available
   for some time and I don’t want to use the plugin which brings it back.
 * Can you tell me which hook I have to use how to use the custom fields (or the
   special custom field) as a filter attribute?
 * _[ [Translator link deleted](https://wordpress.org/support/guidelines/#do-not-spam)]_
    -  This topic was modified 6 years, 5 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/api-filter-orders-by-custom-field/#post-11845736)
 * Hi [@libelle11](https://wordpress.org/support/users/libelle11/),
 * That’s an excellent question. To do this, you will have to add a function to 
   extend the API. It’s not a core feature since the `?filter` option was removed.
 * Here’s a Stack Exchange question that deals with this:
 * [https://wordpress.stackexchange.com/questions/271877/how-to-do-a-meta-query-using-rest-api-in-wordpress-4-7](https://wordpress.stackexchange.com/questions/271877/how-to-do-a-meta-query-using-rest-api-in-wordpress-4-7)
 * Hopefully, that will get you pointed in the right direction.
 * Best,
 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/api-filter-orders-by-custom-field/#post-11868298)
 * Howdy [@libelle11](https://wordpress.org/support/users/libelle11/),
 * It’s been a while since we heard from you, so I’m marking this thread resolved.
   Hopefully, you’ve been able to resolve this, but if you haven’t, please let open
   up a new topic and we’ll be happy to help out.
 * Cheers

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘API: Filter orders by custom field’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/api-filter-orders-by-custom-field/#post-11868298)
 * Status: resolved