Merge pull request #22741 from woocommerce/fix/22701
Put back status parameter after extra processing.
This commit is contained in:
commit
624431d875
|
@ -210,7 +210,7 @@ class WC_REST_Orders_Controller extends WC_REST_Orders_V2_Controller {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function prepare_objects_query( $request ) {
|
protected function prepare_objects_query( $request ) {
|
||||||
// This is needed to get around an array to string notice in WC_REST_Orders_Controller::prepare_objects_query.
|
// This is needed to get around an array to string notice in WC_REST_Orders_V2_Controller::prepare_objects_query.
|
||||||
$statuses = $request['status'];
|
$statuses = $request['status'];
|
||||||
unset( $request['status'] );
|
unset( $request['status'] );
|
||||||
$args = parent::prepare_objects_query( $request );
|
$args = parent::prepare_objects_query( $request );
|
||||||
|
@ -228,6 +228,9 @@ class WC_REST_Orders_Controller extends WC_REST_Orders_V2_Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put the statuses back for further processing (next/prev links, etc).
|
||||||
|
$request['status'] = $statuses;
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue