function my_give_custom_country_list( $countries ) {
//sorts the entire array alphabetically
natcasesort( $countries );
//pulls out France and places it at the beginning of the list
$name = $countries['FR'];
unset( $countries['FR'] );
array_shift( $countries );
$countries = array( '' => '', 'FR' => $name ) + $countries;
return $countries;
}
add_filter( 'give_countries', 'my_give_custom_country_list');
Copyright © 2025 by WP CODE SNIPPETS
Join our mailing list to receive the latest news and updates from our team.