Automattic\WooCommerce\Internal

TermCount::normalize_ids │ private │ WC 1.0

Normalizes arbitrary values to a list of positive integer IDs.

Method of the class: TermCount{}

No Hooks.

Returns

list<int>.

Usage

// private - for code of main (parent) class only
$result = $this->normalize_ids( $ids ): array;
$ids(array<int|string>) (required)
Values to normalize.

TermCount::normalize_ids() code WC 11.2.1

private function normalize_ids( array $ids ): array {
	return array_values( array_filter( array_map( 'absint', $ids ) ) );
}