This commit is contained in:
Tung Du 2022-10-14 21:22:16 +07:00 committed by GitHub
parent 53aabe91dd
commit 8b17d35bb8
1 changed files with 6 additions and 16 deletions

View File

@ -223,24 +223,14 @@ class Cart extends AbstractBlock {
}
$array_without_accents = array_map(
'remove_accents',
array_map(
'wc_strtolower',
array_map(
'html_entity_decode',
array_map(
function ( $element ) {
if ( is_array( $element ) ) {
return $this->deep_sort_with_accents( $element );
}
},
$array
)
)
)
function( $value ) {
return is_array( $value )
? $this->deep_sort_with_accents( $value )
: remove_accents( wc_strtolower( html_entity_decode( $value ) ) );
},
$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 );
}