diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index 5335f6b0987..3e585dd8298 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -1752,12 +1752,9 @@ function wc_uasort_comparison( $a, $b ) { * @return int */ function wc_ascii_uasort_comparison( $a, $b ) { - // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged - if ( function_exists( 'iconv' ) && defined( 'ICONV_IMPL' ) && @strcasecmp( ICONV_IMPL, 'unknown' ) !== 0 ) { - $a = @iconv( 'UTF-8', 'ASCII//TRANSLIT//IGNORE', $a ); - $b = @iconv( 'UTF-8', 'ASCII//TRANSLIT//IGNORE', $b ); - } - // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged + $a = remove_accents( html_entity_decode( $a ) ); + $b = remove_accents( html_entity_decode( $b ) ); + return strcmp( $a, $b ); }