Selezione città RY per WooCommerce

Descrizione

This plubin is based on WC City Select

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.

After selected the city or town, auto set the postcode number if is defined.

How to add cities

Un elenco dele città può essere aggiunto nel file functions.php del tuo tema

Usa il filtro ry_wc_city_select_cities per caricare le città. Il procedimento è simile a Add/Modify States.
Dovrebbe essere aggiunto al file functions.php del tuo tema oppure a un plugin personalizzato

add_filter( 'ry_wc_city_select_cities', 'my_cities' );
/**
 * Replace XX with the country code. Instead of YYY, ZZZ use actual state codes.
 * The City list can list of city name with postcode or just city name.
 */
function my_cities( $cities ) {
    $cities['XX'] = array(
        'YYY' => array( // city name with postcoe
            ['City', '100'],
            ['Another City', '101']
        ),
        'ZZZ' => array( // just city name
            'City 3',
            'City 4'
        )
    );
    return $cities;
}

Installazione

Requisiti minimi

  • PHP 8.2+
  • WordPress 6.8+
  • WooCommerce 10.0+

FAQ

Dove posso contribuire all’elenco delle città del mio paese?

Usa il repository GitHub. Puoi aprire una issue per inviare l’elenco oppure creare una pull request con le modifiche al file

Se il tuo Paese non dispone di un elenco di stati in WooCommerce (vedi il file /woocommerce/i18n/states.php).
Devi anche contribuire aggiungendo l’elenco degli stati.

The sample file is cities/TW.php and states/TW.php

Where can I report bugs or contribute to the project?

Report bugs on the GitHub repository,
or my person website page.

Elenco di tutte le città da http://geonames.org/

Da RY-WC-City-Select-cities-files Puoi aggiungere un elenco di quasi tutti i principali stati e città del mondo.
Tuttavia, alcuni stati o città potrebbero avere un nome diverso rispetto a quello ufficiale.

Per abilitare i dati di geonames.org, aggiungi il codice nel file functions.php del tuo tema.
Oppure usa Code Snippets [https://wordpress.org/plugins/code-snippets/] per aggiungere il codice.

add_filter('ry_wcs_load_geonames_org', '__return_true');

Recensioni

18 Agosto 2023
Good plugin, but the names of cities in my country Armenia are incorrect, please correct it.The list of cities in Armenia can be found on wikipedia site in the search you need to type "List of cities and towns in Armenia"it's not much, only 49 pieces. please fix in zip archive \geonames-org-data\cities\AM.php
Leggi tutte le recensioni di 9

Contributi e sviluppo

“Selezione città RY per WooCommerce” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

“Selezione città RY per WooCommerce” è stato tradotto in 6 lingue. Grazie a chi traduce per il contributo.

Traduci “Selezione città RY per WooCommerce” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.

Changelog

2.3.0 – 2026/10/21

  • Change – Not auto selected the first city option.

2.2.0 – 2026/06/06

  • Update minimum requirements for WordPress and PHP.

2.1.11 – 2025/12/07

  • Fixed – When country change maybe set error city info.

2.1.10 – 2025/12/06

  • Change – when user change state auto-select first city.
  • Change – city required info to WooCommerce (Version 10.3) html tage style.

2.1.9 – 2025/04/29

  • Change minimum requires to WordPress 6.6

2.1.8 – 2025/02/17

  • Fixed error text-domain.
  • Smaller cities name list file.

2.1.6 – 2025/02/07

  • Update language .pot file.

2.1.5 – 2025/02/07

  • Fixed the error default setting.

2.1.4 – 2025/02/04

  • Update postal code for Romania state Sibiu (#9).

2.1.3 – 2025/02/02

  • Update cities for Romania state Sibiu (#8).

2.1.2 – 2024/11/21

  • Change WordPress croe required / tested version info.
  • Change PHP required version info.

2.1.0 – 2024/03/022

  • CAMBIA nome del plugin

2.0.1 – 2023/08/26

  • Fixed change city maynot edit the zip code.

2.0.0 – 2023/04/23

  • CAMBIA licenza a GPLv3

1.1.3.1 – 2023/03/30

  • Change WordPress croe tested version info.

1.1.3 – 2023/02/13

  • Cambia il nome della classe principale

1.1.2 – 2022/07/16

  • Cambia informazioni plugin

1.1.1 – 2022/06-03

  • add Romanian cities. (by condor2)

1.1.0 – 2022/04/04

  • reimposta il codice postale quando si seleziona una città senza CAP (issuu #6)
  • modifica lo stile HTML dei campi del modulo per renderlo più simile a WooCommerce

1.0.0 – 2019/12/07

  • Primo rilascio