Automattic\WooCommerce\Internal
TermCount::normalize_ids
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() TermCount::normalize ids code WC 11.2.1
private function normalize_ids( array $ids ): array {
return array_values( array_filter( array_map( 'absint', $ids ) ) );
}