Fixed omitted grandparent's prepare_objects_query for products endpoint.

This commit is contained in:
Peter Fabian 2018-09-10 13:49:42 +02:00
parent 1237e5ef7e
commit f80d628c56
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller {
* @return array
*/
protected function prepare_objects_query( $request ) {
$args = WC_REST_CRUD_Controller::prepare_objects_query( $request );
// Set post_status.
$args['post_status'] = $request['status'];