Sites with another language than English and when translated country names differ from English country names there are no flags displayed. This occurs because the predefined country names from UM()->builtin()->get( 'countries' )are translated and the UM field country is always returned in English from um_user('country')
Solution replace line 44 with this code and update the plugin version number:
$user_country = __( um_user( 'country' ), 'ultimate-member' ); // Get the users country translated
Plugin: "Displays Country Flag to a Profile & Member Directory" https://github.com/ultimatemember/Extended/tree/main/um-country-flag
Sites with another language than English and when translated country names differ from English country names there are no flags displayed. This occurs because the predefined country names from
UM()->builtin()->get( 'countries' )
are translated and the UM fieldcountry
is always returned in English fromum_user('country')
Solution replace line 44 with this code and update the plugin version number:
$user_country = __( um_user( 'country' ), 'ultimate-member' ); // Get the users country translated
UM Support Forum issue with another quick fix replacing with array of English country names: https://wordpress.org/support/topic/profile-data-issue-again-with-ml-version/page/3/#post-16158099