{"id":114586,"date":"2019-12-07T04:39:06","date_gmt":"2019-12-07T04:39:06","guid":{"rendered":"https:\/\/tw.wordpress.org\/plugins\/ry-wc-city-select\/"},"modified":"2025-12-12T03:03:26","modified_gmt":"2025-12-12T03:03:26","slug":"ry-wc-city-select","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/ry-wc-city-select\/","author":241473,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.1.11","stable_tag":"2.1.11","tested":"6.9.4","requires":"6.7","requires_php":"8.0","requires_plugins":null,"header_name":"RY City Select for WooCommerce","header_author":"Richer Yang","header_description":"Show a dropdown select as the cities input on WooCommerce. Auto set the postcode for selected city.","assets_banners_color":"","last_updated":"2025-12-12 03:03:26","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.me\/RicherYang","header_plugin_uri":"https:\/\/ry-plugin.com\/ry-wc-city-select","header_author_uri":"https:\/\/richer.tw\/","rating":4.9,"author_block_rating":0,"active_installs":2000,"downloads":35576,"num_ratings":9,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"2.0.0":{"tag":"2.0.0","author":"fantasyworld","date":"2023-04-23 05:06:51"},"2.0.1":{"tag":"2.0.1","author":"fantasyworld","date":"2023-08-26 12:13:56"},"2.1.0":{"tag":"2.1.0","author":"fantasyworld","date":"2024-03-02 04:37:43"},"2.1.10":{"tag":"2.1.10","author":"fantasyworld","date":"2025-12-06 03:30:16"},"2.1.11":{"tag":"2.1.11","author":"fantasyworld","date":"2025-12-12 03:03:26"},"2.1.2":{"tag":"2.1.2","author":"fantasyworld","date":"2024-11-21 05:43:50"},"2.1.3":{"tag":"2.1.3","author":"fantasyworld","date":"2025-02-02 16:09:06"},"2.1.5":{"tag":"2.1.5","author":"fantasyworld","date":"2025-02-07 13:28:34"},"2.1.6":{"tag":"2.1.6","author":"fantasyworld","date":"2025-02-07 14:19:04"},"2.1.8":{"tag":"2.1.8","author":"fantasyworld","date":"2025-02-17 13:55:29"},"2.1.9":{"tag":"2.1.9","author":"fantasyworld","date":"2025-04-29 04:33:16"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":1,"5":8},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2207504,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2207504,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.0.0","2.0.1","2.1.0","2.1.10","2.1.11","2.1.2","2.1.3","2.1.5","2.1.6","2.1.8","2.1.9"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[248,1863,1864,286],"plugin_category":[45],"plugin_contributors":[175973],"plugin_business_model":[],"class_list":["post-114586","plugin","type-plugin","status-publish","hentry","plugin_tags-city","plugin_tags-dropdown","plugin_tags-select","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-fantasyworld","plugin_committers-fantasyworld"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/ry-wc-city-select\/assets\/icon-128x128.png?rev=2207504","icon_2x":"https:\/\/ps.w.org\/ry-wc-city-select\/assets\/icon-256x256.png?rev=2207504","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plubin is based on <a href=\"https:\/\/tw.wordpress.org\/plugins\/wc-city-select\/\">WC City Select<\/a><\/p>\n\n<p>WooCommerce uses a text input for the customers to enter the city or town.\nWith this plugin you can provide a list of cities to be shown as a select dropdown.<\/p>\n\n<p>This will be shown in checkout pages, edit addresses pages and shipping calculator if it's configured that way.<\/p>\n\n<p>After selected the city or town, auto set the postcode number if is defined.<\/p>\n\n<h3>How to add cities<\/h3>\n\n<p>A list of cities can be added in your theme functions.php file.<\/p>\n\n<p>Use <code>ry_wc_city_select_cities<\/code> filter to load your cities.\nThis is done similarly to <a href=\"https:\/\/docs.woocommerce.com\/document\/addmodify-states\/\">Add\/Modify States<\/a>.\nIt should be added on your functions.php or a custom plugin.<\/p>\n\n<pre><code>add_filter( 'ry_wc_city_select_cities', 'my_cities' );\n\/**\n * Replace XX with the country code. Instead of YYY, ZZZ use actual state codes.\n * The City list can list of city name with postcode or just city name.\n *\/\nfunction my_cities( $cities ) {\n    $cities['XX'] = array(\n        'YYY' =&gt; array( \/\/ city name with postcoe\n            ['City', '100'],\n            ['Another City', '101']\n        ),\n        'ZZZ' =&gt; array( \/\/ just city name\n            'City 3',\n            'City 4'\n        )\n    );\n    return $cities;\n}\n<\/code><\/pre>\n\n<!--section=installation-->\n<h4>Minimum Requirements<\/h4>\n\n<ul>\n<li>PHP 8.0+<\/li>\n<li>WordPress 6.6+<\/li>\n<li>WooCommerce 8.0+<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id='where%20can%20i%20contribute%20the%20cities%20list%20of%20my%20country%3F'><h3>Where can I contribute the cities list of my country?<\/h3><\/dt>\n<dd><p>Please use <a href=\"https:\/\/github.com\/RicherYang\/RY-WC-City-Select\">GitHub repository<\/a>.\nUse issuu give me the list, or use pull requests the file change.<\/p>\n\n<p>If your country don't have states list in woocommerce (see file \/woocommerce\/i18n\/states.php).\nYou also need contribute the states list.<\/p>\n\n<p>The sample file is cities\/TW.php and states\/TW.php<\/p><\/dd>\n<dt id='where%20can%20i%20report%20bugs%20or%20contribute%20to%20the%20project%3F'><h3>Where can I report bugs or contribute to the project?<\/h3><\/dt>\n<dd><p>Report bugs on the <a href=\"https:\/\/github.com\/RicherYang\/RY-WC-City-Select\/issues\">GitHub repository<\/a>,\nor my <a href=\"https:\/\/ry-plugin.com\/ry-wc-city-select\">person website page<\/a>.<\/p><\/dd>\n<dt id='all%20cities%20list%20from%20http%3A%2F%2Fgeonames.org%2F'><h3>All cities list from http:\/\/geonames.org\/<\/h3><\/dt>\n<dd><p>From the <a href=\"https:\/\/github.com\/sergioxdev\/RY-WC-City-Select-cities-files\">RY-WC-City-Select-cities-files<\/a>\nYou can add almost main states and cities list in the world.\nBut some state or city may use different name with the official name.<\/p>\n\n<p>To enable geonames.org data, add code into you theme functions.php.\nOr use Code Snippets[https:\/\/wordpress.org\/plugins\/code-snippets\/] to add code.<\/p>\n\n<pre><code>add_filter('ry_wcs_load_geonames_org', '__return_true');\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>= 2.1.11 - 2025\/12\/07=\n* Fixed - When country change maybe set error city info.<\/p>\n\n<h4>2.1.10 - 2025\/12\/06<\/h4>\n\n<ul>\n<li>Change - when user change state auto-select first city.<\/li>\n<li>Change - city required info to WooCommerce (Version 10.3) html tage style.<\/li>\n<\/ul>\n\n<h4>2.1.9 - 2025\/04\/29<\/h4>\n\n<ul>\n<li>Change minimum requires to WordPress 6.6<\/li>\n<\/ul>\n\n<h4>2.1.8 - 2025\/02\/17<\/h4>\n\n<ul>\n<li>Fixed error text-domain.<\/li>\n<li>Smaller cities name list file.<\/li>\n<\/ul>\n\n<h4>2.1.6 - 2025\/02\/07<\/h4>\n\n<ul>\n<li>Update language .pot file.<\/li>\n<\/ul>\n\n<h4>2.1.5 - 2025\/02\/07<\/h4>\n\n<ul>\n<li>Fixed the error default setting.<\/li>\n<\/ul>\n\n<h4>2.1.4 - 2025\/02\/04<\/h4>\n\n<ul>\n<li>Update postal code for Romania state Sibiu (<a href=\"https:\/\/github.com\/RicherYang\/RY-WC-City-Select\/issues\/9\">#9<\/a>).<\/li>\n<\/ul>\n\n<h4>2.1.3 - 2025\/02\/02<\/h4>\n\n<ul>\n<li>Update cities for Romania state Sibiu (<a href=\"https:\/\/github.com\/RicherYang\/RY-WC-City-Select\/issues\/8\">#8<\/a>).<\/li>\n<\/ul>\n\n<h4>2.1.2 - 2024\/11\/21<\/h4>\n\n<ul>\n<li>Change WordPress croe required \/ tested version info.<\/li>\n<li>Change PHP required version info.<\/li>\n<\/ul>\n\n<h4>2.1.0 - 2024\/03\/022<\/h4>\n\n<ul>\n<li>CHANGE Plugin name.<\/li>\n<\/ul>\n\n<h4>2.0.1 - 2023\/08\/26<\/h4>\n\n<ul>\n<li>Fixed change city maynot edit the zip code.<\/li>\n<\/ul>\n\n<h4>2.0.0 - 2023\/04\/23<\/h4>\n\n<ul>\n<li>CHANGE License to GPLv3.<\/li>\n<\/ul>\n\n<h4>1.1.3.1 - 2023\/03\/30<\/h4>\n\n<ul>\n<li>Change WordPress croe tested version info.<\/li>\n<\/ul>\n\n<h4>1.1.3 - 2023\/02\/13<\/h4>\n\n<ul>\n<li>Change main class name.<\/li>\n<\/ul>\n\n<h4>1.1.2 - 2022\/07\/16<\/h4>\n\n<ul>\n<li>Change plugin info.<\/li>\n<\/ul>\n\n<h4>1.1.1 - 2022\/06-03<\/h4>\n\n<ul>\n<li>add Romanian cities. (by condor2)<\/li>\n<\/ul>\n\n<h4>1.1.0 - 2022\/04\/04<\/h4>\n\n<ul>\n<li>postal code clear with selected no postal code city (<a href=\"https:\/\/github.com\/RicherYang\/RY-WC-City-Select\/issues\/6\">issuu #6<\/a>)<\/li>\n<li>change form field html style more like woocommerce<\/li>\n<\/ul>\n\n<h4>1.0.0 - 2019\/12\/07<\/h4>\n\n<ul>\n<li>First release<\/li>\n<\/ul>","raw_excerpt":"Show a dropdown select as the cities input on WooCommerce. Auto set the postcode for selected city.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/114586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=114586"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/fantasyworld"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=114586"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=114586"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=114586"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=114586"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=114586"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=114586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}