/woocommerce_states_places

Woocommerce plugin that lists states, cities, local government areas and towns

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Plugin banner

States, Cities, and Places for WooCommerce

  • Stable tag: 1.3.2
  • Requires at least: 4.0
  • Tested up to: 5.9
  • Requires PHP: 7.0
  • WC requires at least: 3.0.x
  • WC tested up to: 5.6
  • License: GPLv2 or later
  • License URI: http://www.gnu.org/licenses/gpl-2.0.html

This plugin adds locations of available countries (see list below) to the State and City fields of the WooCommerce address forms, making the fields filterable to enhance the user experience.

Additionally it adds the States to the Shipping Zones (Cities are not compatible with this area).

Supported Countries

  • ๐Ÿ‡ฉ๐Ÿ‡ฟ Algeria
  • ๐Ÿ‡ฆ๐Ÿ‡บ Australia
  • ๐Ÿ‡ง๐Ÿ‡ญ Bahrain
  • ๐Ÿ‡ง๐Ÿ‡ฉ Bangladesh
  • ๐Ÿ‡ง๐Ÿ‡ง Barbados
  • ๐Ÿ‡ง๐Ÿ‡ด Bolivia
  • ๐Ÿ‡ง๐Ÿ‡ท Brazil
  • ๐Ÿ‡ง๐Ÿ‡ซ Burkina Faso
  • ๐Ÿ‡จ๐Ÿ‡ฑ Chile
  • ๐Ÿ‡จ๐Ÿ‡ด Colombia
  • ๐Ÿ‡จ๐Ÿ‡บ Cuba
  • ๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark
  • ๐Ÿ‡ฉ๐Ÿ‡ด Dominican Republic
  • ๐Ÿ‡ช๐Ÿ‡จ Ecuador
  • ๐Ÿ‡ช๐Ÿ‡ฌ Egypt
  • ๐Ÿ‡ธ๐Ÿ‡ป El Salvador
  • ๐Ÿ‡ฌ๐Ÿ‡ญ Ghana
  • ๐Ÿ‡ฌ๐Ÿ‡น Guatemala
  • ๐Ÿ‡ญ๐Ÿ‡น Haiti
  • ๐Ÿ‡ญ๐Ÿ‡ณ Honduras
  • ๐Ÿ‡ฎ๐Ÿ‡น Italy
  • ๐Ÿ‡ฐ๐Ÿ‡ฟ Kazakhstan
  • ๐Ÿ‡ฐ๐Ÿ‡ท South Korea
  • ๐Ÿ‡ฐ๐Ÿ‡ผ Kuwait
  • ๐Ÿ‡ฑ๐Ÿ‡ง Lebanon
  • ๐Ÿ‡ฒ๐Ÿ‡พ Malaysia
  • ๐Ÿ‡ฒ๐Ÿ‡บ Mauritius
  • ๐Ÿ‡ฒ๐Ÿ‡ฝ Mexico
  • ๐Ÿ‡ณ๐Ÿ‡ฎ Nicaragua
  • ๐Ÿ‡ณ๐Ÿ‡ช Niger
  • ๐Ÿ‡ณ๐Ÿ‡ฌ Nigeria
  • ๐Ÿ‡ด๐Ÿ‡ฒ Oman
  • ๐Ÿ‡ต๐Ÿ‡ฐ Pakistan
  • ๐Ÿ‡ต๐Ÿ‡ฆ Panama
  • ๐Ÿ‡ต๐Ÿ‡พ Paraguay
  • ๐Ÿ‡ต๐Ÿ‡ช Peru
  • ๐Ÿ‡ต๐Ÿ‡น Portugal
  • ๐Ÿ‡ท๐Ÿ‡ด Romania
  • ๐Ÿ‡ท๐Ÿ‡บ Russia
  • ๐Ÿ‡ธ๐Ÿ‡ฆ Saudi Arabia
  • ๐Ÿ‡ช๐Ÿ‡ธ Spain
  • ๐Ÿ‡ฑ๐Ÿ‡ฐ Sri Lanka
  • ๐Ÿ‡น๐Ÿ‡ณ Tunisia
  • ๐Ÿ‡น๐Ÿ‡ท Turkey
  • ๐Ÿ‡ฆ๐Ÿ‡ช United Arab Emirates
  • ๐Ÿ‡บ๐Ÿ‡พ Uruguay
  • ๐Ÿ‡ป๐Ÿ‡ช Venezuela
  • ๐Ÿ‡ป๐Ÿ‡ณ Vietnam
  • Do you want to add your country here?
    Help us extending this list adding your country.

Plugin Demo Site

If you want to see the plugin in action, follow the steps below:

  1. Visit the plugin demo site: https://wcstatesandcities.ml/
  2. Select a sample product from the list.
  3. Go to the Checkout to interact with available country locations.

Available filter hooks

States, Cities, and Places for WooCommerce has two filter hooks for handling the States and Places in all the available countries:

  • scpwoo_custom_states_xx: It allows you to handle the States of a given country. The xx at the end must be replaced by the two-letter country code in lower case.
  • scpwoo_custom_places_xx: It allows you to handle the Places of a given country. The xx at the end must be replaced by the two-letter country code in lower case.

Please read the article Using the filter hooks to learn How to use.

Available languages

  • English (US, Australia, Canada, UK, New Zealand, and South Africa)
  • Spanish (Argentina, Chile, Colombia, Costa Rica, Dominican Republic, Ecuador, Guatemala, Honduras, Mexico, Peru, Puerto Rico, Spain, Uruguay, and Venezuela)
  • Do you want to see your language here?
    Help us translating the plugin to your language.

Screenshots

  • In this screenshot you can see the plugin in action:

Plugin in action

Installation

Automatic installation

  1. Go to your Dashboard ยป Plugins ยป Add new
  2. In the search form write "States, Cities, and Places for Woocommerce"
  3. When the search return the result, click on the Install Now button
  4. Finally, click on the Activate button
  5. Enjoy the plugin!

Manual Installation

  1. Download the plugin from this page clicking on the Download button
  2. Go to your Dashboard ยป Plugins ยป Add new
  3. Now select Upload Plugin button
  4. Click on Select file button and select the file you just download
  5. Click on Install Now button and the Activate Plugin
  6. Enjoy the plugin!

FTP Installation

  1. Download the plugin from this page clicking on the Download button
  2. Decompress the file in your desktop
  3. Run your FTP client software and conect to your WordPress installation
  4. Copy to [root folder]/wp-content/plugins/ the plugin directory you just descompress
  5. Go to your Dashboard ยป Plugins ยป Find the plugin and click on Activate option
  6. Enjoy the plugin!

Frequently Asked Questions

How do I report bugs?

Kindly create an issue stating the bug and how you caught it: Create new issue.

Can I suggest a new place or location?

Yes, you can always suggest or request new locations by creating an issue in the plugin repository in GitHub. Please refer to the Adding a new country instructions to get more details.

Contributors

Changelog

  • 1.3.2 - Dec 31, 2020
    • Added ten new countries:
      • ๐Ÿ‡ง๐Ÿ‡ฉ Bangladesh: Districts and Cities (thanks to S.M. Mehdi Akram)
      • ๐Ÿ‡ง๐Ÿ‡ซ Burkina Faso: Regions and Provinces (thanks to Stรฉphane SAMANDOULOUGOU):
      • ๐Ÿ‡จ๐Ÿ‡บ Cuba: Provinces and Municipalities (thanks to Ramiro Rodpa)
      • ๐Ÿ‡ญ๐Ÿ‡น Haiti: Departments and Communes (thanks to Edner Zephir)
      • ๐Ÿ‡ฒ๐Ÿ‡พ Malaysia: States, Federal territories and Districts (thanks to Amirah Zainuddin)
      • ๐Ÿ‡ฒ๐Ÿ‡บ Mauritius: Districts, Cities, Towns, and Regions (thanks to Audrey)
      • ๐Ÿ‡ฒ๐Ÿ‡ฝ Mexico: States and Municipalities (thanks to Carlos Velasco)
      • ๐Ÿ‡ณ๐Ÿ‡ช Niger: Regions and Departments (thanks to Ibrahim Nasir)
      • ๐Ÿ‡น๐Ÿ‡ท Turkey: Provinces and Districts (thanks to Selcuk)
      • ๐Ÿ‡ป๐Ÿ‡ณ Vietnam: Provinces and Districts (thanks to Nguyen Le)
  • 1.3.1 - Dec 9, 2020
    • Fix filter hook for places in Sri Lanka and Mauritius
  • 1.3 - Nov 30, 2020
    • Since this release you can use two new filter hooks that allows you handling both the list of States and Places:
      • scpwoo_custom_states_xx: It allows you to handle the States of a given country. The xx at the end must be replaced by the two-letter country code in lower case.
      • scpwoo_custom_places_xx: It allows you to handle the Places of a given country. The xx at the end must be replaced by the two-letter country code in lower case. Please read the article Using the filter hooks to learn How to use.
  • 1.2.11 - Oct 07, 2020
    • Added four new countries:
      • ๐Ÿ‡ฆ๐Ÿ‡บ Australia: States, Territories, and Cities (thanks to Gopinath N A)
      • ๐Ÿ‡ง๐Ÿ‡ญ Bahrain: Parishes and Districts (thanks to Ebrahim Ahmed)
      • ๐Ÿ‡ต๐Ÿ‡พ Paraguay: Departments and Districts.
      • ๐Ÿ‡ต๐Ÿ‡ช Peru: Departments and Districts (thanks to David Soto)
    • Updated 1 country:
      • ๐Ÿ‡ช๐Ÿ‡ธ Spain: Updated keys from States array (thanks to Javier Esteban)
  • 1.2.10 - Jul 31, 2020
    • Added five new countries:
      • ๐Ÿ‡ช๐Ÿ‡ฌ Egypt: Governorates and Cities (thanks to Heba Fareed)
      • ๐Ÿ‡ฌ๐Ÿ‡ญ Ghana: Regions, Cities, and Towns (thanks to Edem Adjokatcher)
      • ๐Ÿ‡ฐ๐Ÿ‡ผ Kuwait: Governorates and Districts (thanks to 3Lahoonk)
      • ๐Ÿ‡ฑ๐Ÿ‡ง Lebanon: Provinces and Cities (thanks to Mohamad Ali Makkeh)
      • ๐Ÿ‡ฆ๐Ÿ‡ช United Arab Emirates: Emirates and Localities (thanks to Waqas Ahmad)
    • Updated 2 countries:
      • ๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark: The "State" field was deactivated and all the cities were listed in "City" field directly.
      • ๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark: Updated list of cities (thanks to jonasskafte)
      • ๐Ÿ‡ป๐Ÿ‡ช Venezuela: Removed "Municipality" variable from places/VE.php.
  • 1.2.9 - Jun 20, 2020
    • Added two new countries:
      • ๐Ÿ‡ง๐Ÿ‡ด Bolivia: Departments and Municipalities (thanks to ionixcorp)
      • ๐Ÿ‡ฉ๐Ÿ‡ด Dominican Republic: Provinces and Municipalities (thanks to Javier Molina)
    • Fixed: Algeria did not display the cities (thanks to @yas-se for reporting)
  • 1.2.8 - Jun 01, 2020
    • Added three new countries:
      • ๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark: Regions and Municipalities (thanks to jonasskafte for testing this country)
      • ๐Ÿ‡ญ๐Ÿ‡ณ Honduras: Departments and Municipalities (thanks to jbermudez00)
      • ๐Ÿ‡ต๐Ÿ‡ฐ Pakistan: Provinces, Territories and Districts (thanks to Faisal Basra)
    • Updated 1 country:
      • ๐Ÿ‡ด๐Ÿ‡ฒ Oman: Added translation support for location names (thanks to Moayid)
  • 1.2.7 - May 17, 2020
    • Added five new countries:
      • ๐Ÿ‡ช๐Ÿ‡จ Ecuador: Provinces and Cantons (thanks to Franklin Lucero)
      • ๐Ÿ‡ฐ๐Ÿ‡ฟ Kazakhstan: Regions and Districts (thanks to Iminov Anvar)
      • ๐Ÿ‡ด๐Ÿ‡ฒ Oman: Governorates and Provinces (thanks to iAlwardi)
      • ๐Ÿ‡ท๐Ÿ‡ด Romania: Counties and Cities (thanks to Razvan Farte)
      • ๐Ÿ‡ฑ๐Ÿ‡ฐ Sri Lanka: Districts and Cities (thanks to Pasindu Perera)
    • Updated 1 country:
      • ๐Ÿ‡จ๐Ÿ‡ฑ Chile: removed "Regiรณn:" in State names (thanks to CLobo96)
  • 1.2.6 - April 16, 2020
    • Added four new countries:
      • ๐Ÿ‡ง๐Ÿ‡ง Barbados: Parishes and Places (thanks to Damien Alleyne)
      • ๐Ÿ‡ธ๐Ÿ‡ป El Salvador: Departments and Municipalities (thanks to ChronHeart)
      • ๐Ÿ‡ฎ๐Ÿ‡น Italy: Provinces and Municipalities (thanks to Claudio Tegazzini)
      • ๐Ÿ‡ต๐Ÿ‡น Portugal: Districts, Autonomous Regions and Municipalities (thanks to Javier Esteban)
    • Fixed some issues with ๐Ÿ‡ณ๐Ÿ‡ฌ Nigeria (thanks to Ibrahim Nasir)
    • Added two experimental filter hooks to Algeria (How to use):
      • scpwoo_custom_states_dz - handles Provinces of Algeria
      • scpwoo_custom_places_dz - handles Communes of Algeria
  • 1.2.5 - April 06, 2020
    • Added three new countries:
      • ๐Ÿ‡จ๐Ÿ‡ด Colombia: Departments and Cities (thanks to Josรฉ Ayrรกm)
      • ๐Ÿ‡ธ๐Ÿ‡ฆ Saudi Arabia: Regions and Governorates.
      • ๐Ÿ‡บ๐Ÿ‡พ Uruguay: Departments and Cities (thanks to Alfonso Frachelle)
    • Added support translation feature for location names of Algeria and Saudi Arabia.
    • Added plugin page banner and icon. Thanks to Javier Esteban!
    • Updated screenshot.
  • 1.2.4 - March 30, 2020
    • Fix an issue with a country (Algeria)
  • 1.2.3 - March 22, 2020
    • Added localization to "State" and "City" field labels
  • 1.2.2 - March 22, 2020
    • Added six new countries:
      • ๐Ÿ‡ฉ๐Ÿ‡ฟ Algeria: Departments (Wilaya) and Municipalities (Baladiyahs) (thanks to Walid Yacine MAZED)
      • ๐Ÿ‡ง๐Ÿ‡ท Brazil: States and Municipalities (country request - issue #35)
      • ๐Ÿ‡ณ๐Ÿ‡ฎ Nicaragua: Departments and Cities (thanks to ahc505)
      • ๐Ÿ‡ท๐Ÿ‡บ Russia: States and Cities (thanks to Sarge Madovsky)
      • ๐Ÿ‡ช๐Ÿ‡ธ Spain: Provinces and Municipalities (thanks to Javier Esteban)
      • ๐Ÿ‡น๐Ÿ‡ณ Tunisia: Governorates and Districts (thanks to Anouar Ben Saad)
    • Updated 2 countries:
      • ๐Ÿ‡จ๐Ÿ‡ฑ Chile: states codes (thanks to Luis Urrutia)
      • ๐Ÿ‡ฌ๐Ÿ‡น Guatemala: missing municipalities (thanks to macnomo)
    • Tested up to WooCommerce 4.0.1
  • 1.2.1 - March 18, 2020
    • Added two new countries:
      • ๐Ÿ‡ต๐Ÿ‡ฆ Panama: Provinces, Districts and Corregimientos
      • ๐Ÿ‡ป๐Ÿ‡ช Venezuela: States and Municipalities (with their capitals)
    • Invert the order of State and City fields to have more sense with the steps of form.
    • Fix text domain in plugin header comment (states-cities-and-places-for-woocommerce).
    • Fix some typos and strings without translation functions.
  • 1.2.0 - February 07, 2019
    • Added a new country:
      • ๐Ÿ‡ฌ๐Ÿ‡น Guatemala
  • 1.1.1 - August 28, 2018
    • Updated Chilean states and cities (16 states, no numbers).
  • 1.1.0 - July 09, 2017
    • Added a new country:
      • ๐Ÿ‡จ๐Ÿ‡ฑ Chile
  • 1.0.2 - August 11, 2016
    • Change author name.
  • 1.0.1 - August 10, 2016
    • Updated README file.
  • 1.0 - August 10, 2016
    • First release.