wc_uasort_comparison()WC 3.5.1

User to sort two values with ausort.

No Hooks.

Return

Int.

Usage

wc_uasort_comparison( $a, $b );
$a(int) (required)
First value to compare.
$b(int) (required)
Second value to compare.

Changelog

Since 3.5.1 Introduced.

wc_uasort_comparison() code WC 8.7.0

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