WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\BlockTypes

Checkout::deep_sort_with_accents() protected WC 1.0

Removes accents from an array of values, sorts by the values, then returns the original array values sorted.

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

No Hooks.

Return

Array. Sorted array.

Usage

// protected - for code of main (parent) or child class
$result = $this->deep_sort_with_accents( $array );
$array(array) (required)
Array of values to sort.

Code of Checkout::deep_sort_with_accents() WC 5.7.1

protected function deep_sort_with_accents( $array ) {
	if ( ! is_array( $array ) || empty( $array ) ) {
		return $array;
	}

	if ( is_array( reset( $array ) ) ) {
		return array_map( [ $this, 'deep_sort_with_accents' ], $array );
	}

	$array_without_accents = array_map( 'remove_accents', array_map( 'wc_strtolower', array_map( 'html_entity_decode', $array ) ) );
	asort( $array_without_accents );
	return array_replace( $array_without_accents, $array );
}