WC_REST_Order_Refunds_V2_Controller::prepare_objects_query()protectedWC 3.0.0

Prepare objects query.

Method of the class: WC_REST_Order_Refunds_V2_Controller{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->prepare_objects_query( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Changelog

Since 3.0.0 Introduced.

WC_REST_Order_Refunds_V2_Controller::prepare_objects_query() code WC 8.7.0

protected function prepare_objects_query( $request ) {
	$args = parent::prepare_objects_query( $request );

	$args['post_status']     = array_keys( wc_get_order_statuses() );
	$args['post_parent__in'] = array( absint( $request['order_id'] ) );

	return $args;
}