This code worked except my options weren’t ordered correctly. The option_order arg didn’t work. It looks like option_order does not get saved in the database. Instead I used the following code where it uses whatever order the country array is in:
`function your_plugin_activation() {
//country
wh_add_country_list();
}
//on activation or if you add this to functions use add_action ‘bp_init’
register_activation_hook(__FILE__, ‘your_plugin_activation’);
function wh_add_country_list() {
if (xprofile_get_field_id_from_name(‘Country’)) return;