Title: WC City Select
Author: mantish
Published: <strong>11 сар 11, 2015</strong>
Last modified: 3 сар 22, 2025

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/wc-city-select.svg)

# WC City Select

 By [mantish](https://profiles.wordpress.org/mantish/)

[Download](https://downloads.wordpress.org/plugin/wc-city-select.1.0.10.zip)

 * [Details](https://mn.wordpress.org/plugins/wc-city-select/#description)
 * [Reviews](https://mn.wordpress.org/plugins/wc-city-select/#reviews)
 * [Development](https://mn.wordpress.org/plugins/wc-city-select/#developers)

 [Support](https://wordpress.org/support/plugin/wc-city-select/)

## Description

WooCommerce uses a text input for the customers to enter the city or town. With 
this plugin you can provide a list of cities to be shown as a select dropdown.

This will be shown in checkout pages, edit addresses pages and shipping calculator
if it’s configured that way.

### WooCommerce Cart and Checkout Blocks

This plugin is not yet compatible with Blocks.
 It works using the legacy shortcodes:`[
woocommerce_cart]` and `[woocommerce_checkout]`.

To make this plugin work, you can use these shortcodes instead of the blocks for
your Cart and Checkout pages.

### How to add cities

A list of cities has to be loaded in the functions.php file (the plugin already 
includes cities from some countries).

Use `wc_city_select_cities` filter to load your cities. This is done similarly to
[adding states/provinces](https://docs.woothemes.com/document/addmodify-states/).

It should be added on your functions.php or a custom plugin.

    ```
    add_filter( 'wc_city_select_cities', 'my_cities' );
    /**
     * Replace XX with the country code. Instead of YYY, ZZZ use actual  state codes.
     */
    function my_cities( $cities ) {
        $cities['XX'] = array(
            'YYY' => array(
                'City ',
                'Another City'
            ),
            'ZZZ' => array(
                'City 3',
                'City 4'
            )
        );
        return $cities;
    }
    ```

It’s also possible to use a list of cities without grouping them by state:

    ```
    add_filter( 'wc_city_select_cities', 'my_cities' );
    function my_cities( $cities ) {
        $cities['XX'] = array(
            'City ',
            'Another City'
        );
        return $cities;
    }
    ```

### Github

Source code and contributions at [github](https://github.com/8manos/wc-city-select)

## Reviews

![](https://secure.gravatar.com/avatar/d19b9e5d78d4cedb25981f87748cca042728971121a911d69ecaa0d40608439e?
s=60&d=retro&r=g)

### 󠀁[Good, but must be updated](https://wordpress.org/support/topic/good-but-must-be-updated/)󠁿

 [floartgraphy](https://profiles.wordpress.org/floartgraphy/) 11 сар 25, 2024

It’s a very good plugin, but must be updated for latest wp version. My website is
loading very slow. I deactivate the plugin and works fine. I use it with woocommerce.
Please update the plugin!

![](https://secure.gravatar.com/avatar/f0aadef0840b8f3e97e084a3465cb30c5af0a8fec3368f0f5ea69e68c8672e53?
s=60&d=retro&r=g)

### 󠀁[ESTUPENDA, EXCELENTE](https://wordpress.org/support/topic/estupenda-excelente/)󠁿

 [vallesierra7](https://profiles.wordpress.org/vallesierra7/) 11 сар 12, 2024

Es un plugin muy valioso, en mi caso lo es, me ayudo muchisimo, ademas el codigo
para agregar las ciudades es muy facil de implementar. Me encanto!

![](https://secure.gravatar.com/avatar/0c3aa0156de35775a3ed3486f7392d60e05c1efeaaa224551c743198f6974e28?
s=60&d=retro&r=g)

### 󠀁[Lovvvve ❤](https://wordpress.org/support/topic/lovvvve-%e2%9d%a4/)󠁿

 [Mahmoud Hossam](https://profiles.wordpress.org/moodyhosam/) 4 сар 9, 2023

Especially after the latest update, greetings from Egypt! ❤

![](https://secure.gravatar.com/avatar/4b014f08df13cc237b915bd46a432f6c005c3e7bf440c71373b363a067670242?
s=60&d=retro&r=g)

### 󠀁[Love it](https://wordpress.org/support/topic/love-it-2848/)󠁿

 [kanzaw](https://profiles.wordpress.org/kanzaw/) 12 сар 20, 2019

Love it, but this should be update for the new version. it’s good plugin for all
users

![](https://secure.gravatar.com/avatar/869bea5e8008bc7c3d350a35feb6440ec18bd09296f8e6f198e2158066397180?
s=60&d=retro&r=g)

### 󠀁[Core function](https://wordpress.org/support/topic/core-function/)󠁿

 [josemuro](https://profiles.wordpress.org/josemuro/) 12 сар 5, 2018

It should be a core function. Thanks, great job.

![](https://secure.gravatar.com/avatar/3a84a2285f065a65b9dd4ad3cdf11393e725d3deb8ea7a4edf2ac2a1c89f5676?
s=60&d=retro&r=g)

### 󠀁[Help me Please](https://wordpress.org/support/topic/help-me-please-51/)󠁿

 [kr0128](https://profiles.wordpress.org/kr0128/) 7 сар 16, 2018

I want to add district dropdown base on the option value of city. because in your
code you just get the option name as option value. i want to make it like country
and states thats have a option value code. thank you!

 [ Read all 13 reviews ](https://wordpress.org/support/plugin/wc-city-select/reviews/)

## Contributors & Developers

“WC City Select” is open source software. The following people have contributed 
to this plugin.

Contributors

 *   [ mantish ](https://profiles.wordpress.org/mantish/)
 *   [ Eduard Doloc ](https://profiles.wordpress.org/rwky/)

[Translate “WC City Select” into your language.](https://translate.wordpress.org/projects/wp-plugins/wc-city-select)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/wc-city-select/), check
out the [SVN repository](https://plugins.svn.wordpress.org/wc-city-select/), or 
subscribe to the [development log](https://plugins.trac.wordpress.org/log/wc-city-select/)
by [RSS](https://plugins.trac.wordpress.org/log/wc-city-select/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.10

 * Update Romanian cities

#### 1.0.9

 * Load select with only the correct cities for the Country / State
 * Declare Blocks (in)compatibility

#### 1.0.8

 * Fix issue in Egypt cities file (EGDK missing)
 * Declare WooCommerce HPOS compatibility

#### 1.0.7

 * Add city files for Egypt
 * Update Italian cities

#### 1.0.6

 * Add support to WordPress multisite.

#### 1.0.5

 * Version bump without changes. Update if missing city files for new countries.

#### 1.0.4

 * Add city files for several countries: EC, DK, CA, CN, IT, BR, RO.
 * fix warnings when using multiple countries.

#### 1.0.3

 * fix some issues when loading cities initially, that were causing warnings.

#### 1.0.2

 * fix some issues with shipping calculator and other edge cases.
 * Now works with countries that have no states, only cities.

#### 1.0.1

 * select2 enhancement when available. Adds a JS version of the select dropdown.

#### 1.0

 * First release.

## Meta

 *  Version **1.0.10**
 *  Last updated **1 жил ago**
 *  Active installations **3,000+**
 *  WordPress version ** 4.0 or higher **
 *  Tested up to **6.8.5**
 *  Language
 * [English (US)](https://wordpress.org/plugins/wc-city-select/)
 * Tags
 * [City Dropdown](https://mn.wordpress.org/plugins/tags/city-dropdown/)[woocommerce](https://mn.wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://mn.wordpress.org/plugins/wc-city-select/advanced/)

## Ratings

 4.9 out of 5 stars.

 *  [  13 5-star reviews     ](https://wordpress.org/support/plugin/wc-city-select/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/wc-city-select/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/wc-city-select/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/wc-city-select/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/wc-city-select/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wc-city-select/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wc-city-select/reviews/)

## Contributors

 *   [ mantish ](https://profiles.wordpress.org/mantish/)
 *   [ Eduard Doloc ](https://profiles.wordpress.org/rwky/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/wc-city-select/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://mn.wordpress.org/plugins/wc-city-select/paypal@8manos.com?output_format=md)