• Resolved Danillo Estrela

    (@danilloestrela)


    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

    (@condless)

    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

    (@danilloestrela)

    Hello! Can you check this out, please?

    Dashboard => WooCommerce => Settings => Store Address:
    https://s1.imghub.io/38X7e.png

    Here is the configs:
    https://s1.imghub.io/378PF.png

    Here is the result when I search for a city in shipping:
    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

    (@condless)

    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

    (@danilloestrela)

    Worked smooth! One more thing:
    Here: 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

    (@condless)

    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.