Custom City Order
I have added a code snippet to carry Turkey to top in country list in woocommerce (https://prnt.sc/1ru95tq) . Here is my code snippet in fucntions.php:
add_filter('woocommerce_sort_countries', '__return_false');
add_filter( 'woocommerce_countries', 'change_country_order_in_checkout_form' );
function change_country_order_in_checkout_form($countries)
{
$tr = $countries['TR'];
return array('TR' => $tr) + $countries;
}
Is there any option that to custom sort also Cities for Turkey in dropdown list? (https://prnt.sc/1ru987a)
BTW currently even if i didn't select any country, in City dropdown autoamtically filled by Turkey cities in page load. This is strange?
Regards.