WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

DataStore::get_object_where_filter() protected WC 1.0

Get WHERE filter by object ids subquery.

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

No Hooks.

Return

String. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_object_where_filter( $select_table, $select_field, $filter_table, $filter_field, $compare, $id_list );
$select_table(string) (required)
Select table name.
$select_field(string) (required)
Select table object ID field name.
$filter_table(string) (required)
Lookup table name.
$filter_field(string) (required)
Lookup table object ID field name.
$compare(string) (required)
Comparison string (IN|NOT IN).
$id_list(string) (required)
Comma separated ID list.

Code of DataStore::get_object_where_filter() WC 5.3.0

<?php
protected function get_object_where_filter( $select_table, $select_field, $filter_table, $filter_field, $compare, $id_list ) {
	global $wpdb;
	if ( empty( $id_list ) ) {
		return '';
	}

	$lookup_name = isset( $wpdb->$filter_table ) ? $wpdb->$filter_table : $wpdb->prefix . $filter_table;
	return " {$select_table}.{$select_field} {$compare} (
		SELECT
			DISTINCT {$filter_table}.{$select_field}
		FROM
			{$filter_table}
		WHERE
			{$filter_table}.{$filter_field} IN ({$id_list})
	)";
}