Title: Include State
Last modified: October 23, 2020

---

# Include State

 *  Resolved [Danillo Estrela](https://wordpress.org/support/users/danilloestrela/)
 * (@danilloestrela)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/include-state/)
 * Hello people! Thanks for the excellent work with this plugin, it is really useful!
 * Here in Brazil, many cities have the same name and when I search for some of 
   them, I don’t know which state that city belongs to. Would it be possible to 
   put, next to the name of the cities, the name of the state and country?
 * Thus: Santa Rita, Paraíba, Brazil
 * Maybe I can help if you have any git 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/include-state/#post-13571185)
 * Hi Danillo,
    Please make sure Brazil is configured as the Store Country (Dashboard
   => WooCommerce => Settings => Store Address) and than enable the ‘Filters’ option(
   via the plugin settings)
 *  Thread Starter [Danillo Estrela](https://wordpress.org/support/users/danilloestrela/)
 * (@danilloestrela)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/include-state/#post-13574214)
 * Hello! Can you check this out, please?
 * Dashboard => WooCommerce => Settings => Store Address:
    [https://s1.imghub.io/38X7e.png](https://s1.imghub.io/38X7e.png)
 * Here is the configs:
    [https://s1.imghub.io/378PF.png](https://s1.imghub.io/378PF.png)
 * Here is the result when I search for a city in shipping:
    [https://s1.imghub.io/3LD96.png](https://s1.imghub.io/3LD96.png)
   See that “Santa Rita” Repeats? That is because we have two cities in Brazil from
   differente states with the same name… That’s why I asked you this here…
 * Can you help me please?
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/include-state/#post-13575135)
 * Hi,
    In the plugin code replace this line: `if ( ! is_admin() && 'yes' === get_option('
   wc_csz_new_state_field' ) && $country_code === WC()->countries->get_base_country()){`
   with this one: `if ( ( ! is_admin() || apply_filters( 'csz_admin_city_state_prefix',
   false ) ) && 'yes' === get_option( 'wc_csz_new_state_field' ) && $country_code
   === WC()->countries->get_base_country() ) {`
 * and add this to your theme’s functions.php file:
    `add_filter( 'csz_admin_city_state_prefix','
   __return_true' );`
 *  Thread Starter [Danillo Estrela](https://wordpress.org/support/users/danilloestrela/)
 * (@danilloestrela)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/include-state/#post-13575209)
 * Worked smooth! One more thing:
    Here: [https://s1.imghub.io/38X7e.png](https://s1.imghub.io/38X7e.png)
 * In Country/State (“Pais/Estado” in portuguese) field, for some reason is getting
   the city of “João Pessoa”. It should get only the Country or State, do you agree?
 * Can you help me with this too?
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/include-state/#post-13575692)
 * Since the plugin replaces the original country’s states with the country’s cities,
   WooCommerce sees those cities as the states of the country, that why you see 
   the city of “João Pessoa” instead of ‘Paraíba’ in this setting.
    Your settings
   are configured properly and WooCommerce should work as usual.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Include State’ is closed to new replies.

 * ![](https://ps.w.org/cities-shipping-zones-for-woocommerce/assets/icon-256x256.
   png?rev=2303879)
 * [Cities Shipping Zones for WooCommerce](https://wordpress.org/plugins/cities-shipping-zones-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cities-shipping-zones-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cities-shipping-zones-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/cities-shipping-zones-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cities-shipping-zones-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cities-shipping-zones-for-woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Condless](https://wordpress.org/support/users/condless/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/include-state/#post-13575692)
 * Status: resolved