0

This is a WordPress URL with parameters post_type and post_status.

https://www.example.co.uk/wp-admin/edit.php?post_type=shop_order&post_status=wc-pending

I need two post_status so the query fetches both, which would be an OR condition in the query but this would require editing the core.

https://www.example.co.uk/wp-admin/edit.php?post_type=shop_order&post_status=wc-pending&post_status=wc-processing

This only fetches wc-processing, when i want it two fetch both wc-processing and wc-pending.

Is there anyway to do this so that I don't have to edit the core files of WordPress?

Deep Kakkar
  • 5,831
  • 4
  • 39
  • 75
user892134
  • 3,078
  • 16
  • 62
  • 128
  • possible duplicate of [How to pass an array within a query string?](http://stackoverflow.com/questions/6243051/how-to-pass-an-array-within-a-query-string) – rnevius Jun 02 '15 at 09:53

1 Answers1

1

The post status parameters accept an array:

https://www.example.co.uk/wp-admin/edit.php?post_type=shop_order&post_status[]=wc-pending&post_status[]=wc-processing
rnevius
  • 26,578
  • 10
  • 58
  • 86
  • i tried this `edit.php?post_type=shop_order&post_status[]=wc-completed&post_status[]=wc-processing` and results with `wc-pending` are returning. Any idea why? – user892134 Jun 02 '15 at 11:21