filterwoocommercemeta-key

Filter orders by meta with woocommerce rest api


I am trying to filter the order by the meta key (i have created a meta key called order_secret_code), but i still receive all of the orders. Can any one help me with it?

'orders?filter[meta]=true&filter[meta_key]=order_secret_code&filter[meta_value]='+$stateParams.secretcode

Solution

  • http://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-products Sort collection by object attribute. Options: date, id, include, title and slug. Default is date. Using filter[meta_value] is deprecated.