WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

DataStore::get_excluded_products_array() protected WC 1.0

Returns an array of ids of disallowed products, based on query arguments from the user.

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

No Hooks.

Return

Array. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_excluded_products_array( $query_args );
$query_args(array) (required)
Parameters supplied by the user.

Code of DataStore::get_excluded_products_array() WC 5.2.2

<?php
protected function get_excluded_products_array( $query_args ) {
	$excluded_products = array();
	$operator          = $this->get_match_operator( $query_args );

	if ( isset( $query_args['category_excludes'] ) && is_array( $query_args['category_excludes'] ) && count( $query_args['category_excludes'] ) > 0 ) {
		$excluded_products = $this->get_products_by_cat_ids( $query_args['category_excludes'] );
	}

	if ( isset( $query_args['product_excludes'] ) && is_array( $query_args['product_excludes'] ) && count( $query_args['product_excludes'] ) > 0 ) {
		$excluded_products = array_merge( $excluded_products, $query_args['product_excludes'] );
	}

	return $excluded_products;
}