You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using wc-city-select on multilingual WooCommerce website.
The issue is while user ordered, city will stored in the user language, and it will cause some issues with shipping plugins, city should be always English.
I tried to solve it by editing this : foreach ( $this->dropdown_cities as $city_name ) { $field .= '<option value="' . $city_name. '" '.selected( $value, $city_name, false ) . '>' . $city_name .'</option>'; }
and another edit on the cities array : $cities['SA'] = array( 'Riyadh' => array( 'Riyadh' => __('Riyadh','wc_cities_p'), ));
by this way, index will be always in English language, and city will be compatible with WPML..etc
But, it actually didn't work because the first section does not appear on the HTML, I mean the billing_city or shipping_city select element always showing the original one.
where can I find this elements loop to edit it?
The text was updated successfully, but these errors were encountered:
Hi,
I'm using wc-city-select on multilingual WooCommerce website.
The issue is while user ordered, city will stored in the user language, and it will cause some issues with shipping plugins, city should be always English.
I tried to solve it by editing this :
foreach ( $this->dropdown_cities as $city_name ) { $field .= '<option value="' . $city_name. '" '.selected( $value, $city_name, false ) . '>' . $city_name .'</option>'; }
and replace it with:
foreach ( $this->dropdown_cities as $index => $city_name ) { $field .= '<option value="' . $index . '" '.selected( $value, $city_name, false ) . '>' . $city_name .'</option>'; }
and another edit on the cities array :
$cities['SA'] = array( 'Riyadh' => array( 'Riyadh' => __('Riyadh','wc_cities_p'), ));
by this way, index will be always in English language, and city will be compatible with WPML..etc
But, it actually didn't work because the first section does not appear on the HTML, I mean the billing_city or shipping_city select element always showing the original one.
where can I find this elements loop to edit it?
The text was updated successfully, but these errors were encountered: