WordPress at Your Fingertips
function is not described

WC_Query::adjust_posts_count() public WC 4.4.0

This function used to be hooked to found_posts and adjust the posts count when the filtering by attribute widget was used and variable products were present. Now it isn't hooked anymore and does nothing but return the input unchanged, since the pull request in which it was introduced has been reverted.

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

No Hooks.

Return

Int. Adjusted posts count.

Usage

$WC_Query = new WC_Query();
$WC_Query->adjust_posts_count( $count, $query );
$count(int) (required)
Original posts count, as supplied by the found_posts filter.
$query(WP_Query) (required)
The current WP_Query object.

Changelog

Since 4.4.0 Introduced.

Code of WC_Query::adjust_posts_count() WC 5.7.1

public function adjust_posts_count( $count, $query ) {
	return $count;
}