wc_uasort_comparison( int $a, int $b )

User to sort two values with ausort.


Description Description


Parameters Parameters

$a

(Required) First value to compare.

$b

(Required) Second value to compare.


Top ↑

Return Return

(int)


Top ↑

Source Source

File: includes/wc-core-functions.php

function wc_uasort_comparison( $a, $b ) {
	if ( $a === $b ) {
		return 0;
	}
	return ( $a < $b ) ? -1 : 1;
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.5.1 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.