WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

Orders::prepare_objects_query() protected WC 1.0

Prepare objects query.

{} It's a method of the class: Orders{}

No Hooks.

Return

Array. Nothing.

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.

Code of Orders::prepare_objects_query() WC 5.3.0

<?php
protected function prepare_objects_query( $request ) {
	global $wpdb;
	$args = parent::prepare_objects_query( $request );

	// Search by partial order number.
	if ( ! empty( $request['number'] ) ) {
		$partial_number = trim( $request['number'] );
		$limit          = intval( $args['posts_per_page'] );
		$order_ids      = $wpdb->get_col(
			$wpdb->prepare(
				"SELECT ID
				FROM {$wpdb->prefix}posts
				WHERE post_type = 'shop_order'
				AND ID LIKE %s
				LIMIT %d",
				$wpdb->esc_like( absint( $partial_number ) ) . '%',
				$limit
			)
		);

		// Force WP_Query return empty if don't found any order.
		$order_ids        = empty( $order_ids ) ? array( 0 ) : $order_ids;
		$args['post__in'] = $order_ids;
	}

	return $args;
}