Title: Sri Lankan Cities for WooCommerce
Author: Thushara Lakshan
Published: <strong>ಜುಲೈ 3, 2026</strong>
Last modified: ಜುಲೈ 3, 2026

---

ಪ್ಲಗಿನ್‌ಗಳನ್ನು ಹುಡುಕಿ

![](https://ps.w.org/sl-cities-woo/assets/banner-772x250.png?rev=3594909)

![](https://ps.w.org/sl-cities-woo/assets/icon-256x256.png?rev=3594909)

# Sri Lankan Cities for WooCommerce

 ‍[Thushara Lakshan](https://profiles.wordpress.org/lakshan12/) ಮೂಲಕ

[ಡೌನ್ಲೋಡ್](https://downloads.wordpress.org/plugin/sl-cities-woo.1.0.0.zip)

 * [ವಿವರಗಳು](https://kn.wordpress.org/plugins/sl-cities-woo/#description)
 * [‍ವಿಮರ್ಶೆಗಳು‍](https://kn.wordpress.org/plugins/sl-cities-woo/#reviews)
 *  [ಸ್ಥಾಪನೆ](https://kn.wordpress.org/plugins/sl-cities-woo/#installation)
 * [ಅಭಿವೃದ್ಧಿ](https://kn.wordpress.org/plugins/sl-cities-woo/#developers)

 [ಬೆಂಬಲ](https://wordpress.org/support/plugin/sl-cities-woo/)

## ವಿವರಣೆ

WooCommerce ships Sri Lanka with no districts and the State field hidden. This plugin
makes checkout work the way Sri Lankan addresses actually work: _101, Main Street,
Negombo, Gampaha, 11500, Sri Lanka_.

 * Adds all **25 districts** as a required **District** dropdown, keyed by ISO 3166-
   2:LK codes so couriers and shipping plugins interoperate.
 * Suggests **cities for the selected district** while the customer types — 288 
   verified cities across all 25 districts.
 * **Autofills the postal code** when a known city is picked — still editable, and
   it never overwrites a code the customer typed themselves.
 * Lets you build **district-based shipping zones** (WooCommerce  Settings  Shipping
   Add zone  pick districts).
 * Works on **both** the classic (shortcode) checkout and the block checkout.

#### Safety and design

 * **No external services.** No data leaves your site, nothing is tracked, no account
   is needed.
 * No AJAX endpoints, no database writes, no extra checkout fields — WooCommerce
   validates the district server-side automatically.
 * Everything fails safe: without WooCommerce the plugin does nothing; with JavaScript
   blocked, the district dropdown still works and city/postcode are normal manual
   fields.
 * Block-checkout updates go through WooCommerce’s official wp.data store API.

#### Data provenance

Every autofilled postal code was verified against Sri Lanka Post and independent
directories (July 2026). Cities whose codes could not be fully verified are left
out — for those, the city field simply works as a plain text box.

## ಸ್ಕ್ರೀನ್‌ಶಾಟ್‌ಗಳು

[⌊Classic checkout — the required District dropdown with all 25 Sri Lankan districts.⌉⌊
Classic checkout — the required District dropdown with all 25 Sri Lankan districts
.⌉[

Classic checkout — the required District dropdown with all 25 Sri Lankan districts.

[⌊Pick a known city and the postal code fills in automatically — shipping switches
to the matching district zone.⌉⌊Pick a known city and the postal code fills in automatically—
shipping switches to the matching district zone.⌉[

Pick a known city and the postal code fills in automatically — shipping switches
to the matching district zone.

[⌊The block checkout is fully supported: district, city suggestions and postcode
autofill.⌉⌊The block checkout is fully supported: district, city suggestions and
postcode autofill.⌉[

The block checkout is fully supported: district, city suggestions and postcode autofill.

[⌊Ship by district — districts appear as regions in WooCommerce <span aria-hidden=⌉⌊Ship by district — districts appear as regions in WooCommerce <span aria-hidden=⌉→ Settings  Shipping.” class=”wp-image-9000004″ srcset=”https://i0.wp.com/ps.w.org/sl-cities-woo/assets/screenshot-4.png?rev=3594909&w=300 300w, https://i0.wp.com/ps.w.org/sl-cities-woo/assets/screenshot-4.png?rev=3594909&w=600 600w, https://i0.wp.com/ps.w.org/sl-cities-woo/assets/screenshot-4.png?rev=3594909&w=900 900w” sizes=”(max-width: 599px) 50vw, 33vw” width=”1280″ height=”868″ loading=”eager” fetchpriority=”high” decoding=”async”/>](https://ps.w.org/sl-cities-woo/assets/screenshot-4.png?rev=3594909)

Ship by district — districts appear as regions in WooCommerce  Settings  Shipping.

## ಸ್ಥಾಪನೆ

 1. Install and activate from Plugins  Add New Plugin (or upload the zip via Upload
    Plugin).
 2. WooCommerce 8.9 or newer must be active.
 3. Done — districts, city suggestions and postcode autofill work immediately on checkout.
    The plugin has no settings page of its own; the **Settings** link on the Plugins
    screen takes you to WooCommerce’s shipping settings, where the districts appear
    as zone regions.

**Upgrading from the code-snippet version:** if you previously installed this as
a snippet (FluentSnippets, a child theme’s functions.php, or an mu-plugin file),
remove that copy BEFORE activating the plugin. Both loaded at once causes a duplicate-
function PHP error.

## FAQ

### How do I add my own cities?

Use the `slwc_city_data` filter from your child theme or a small snippet:

    ```
    add_filter( 'slwc_city_data', function ( $data ) {
        $data['LK-12']['My Village'] = '11123'; // district code => city => postcode
        return $data;
    } );
    ```

District keys are ISO 3166-2:LK codes (the full list is in the District dropdown
at checkout). Keep postcodes as quoted 5-digit strings — leading zeros matter.

### Does it work with the block checkout?

Yes. Both the classic shortcode checkout and the block checkout are supported; block
updates go through WooCommerce’s official wp.data store API.

### What if a customer’s city is not in the list?

Nothing breaks: the city field keeps working as a normal text box and the customer
types their postcode manually.

### Can I ship by district?

Yes — the districts appear as regions in WooCommerce  Settings  Shipping  Add zone,
so you can price shipping per district.

## ‍ವಿಮರ್ಶೆಗಳು‍

ಈ ಪ್ಲಗಿನ್‌ಗೆ ಯಾವುದೇ ವಿಮರ್ಶೆಗಳಿಲ್ಲ.

## ಕೊಡುಗೆದಾರರು & ಡೆವಲಪರ್‌ಗಳು

“Sri Lankan Cities for WooCommerce” ಓಪನ್ ಸೋರ್ಸ್ ಸಾಫ್ಟ್‌ವೇರ್ ಆಗಿದೆ. ಕೆಳಗಿನ ಜನರು ಈ
ಪ್ಲಗಿನ್‌ಗೆ ಕೊಡುಗೆ ನೀಡಿದ್ದಾರೆ.

ಕೊಡುಗೆದಾರರು

 *   [ Thushara Lakshan ](https://profiles.wordpress.org/lakshan12/)

[“Sri Lankan Cities for WooCommerce” ಅನ್ನು ನಿಮ್ಮ ಭಾಷೆಗೆ ಅನುವಾದಿಸಿ.](https://translate.wordpress.org/projects/wp-plugins/sl-cities-woo)

### ಅಭಿವೃದ್ಧಿಯಲ್ಲಿ ಆಸಕ್ತಿ ಇದೆಯೇ?

[ಕೋಡ್ ಬ್ರೌಸ್ ಮಾಡಿ](https://plugins.trac.wordpress.org/browser/sl-cities-woo/), [SVN ರೆಪೊಸಿಟರಿ](https://plugins.svn.wordpress.org/sl-cities-woo/)
ಪರಿಶೀಲಿಸಿ, ಅಥವಾ [ಅಭಿವೃದ್ಧಿ ಲಾಗ್](https://plugins.trac.wordpress.org/log/sl-cities-woo/)
ಗೆ [RSS](https://plugins.trac.wordpress.org/log/sl-cities-woo/?limit=100&mode=stop_on_copy&format=rss)
ಚಂದಾದಾರರಾಗಿ.

## Changelog

#### 1.0.0

 * Initial release: 25 districts at checkout, 288-city suggestions, postcode autofill,
   district shipping zones, classic + block checkout.

## ಮೆಟಾ

 *  Version **1.0.0**
 *  ಕೊನೆಯದಾಗಿ ನವೀಕರಿಸಿದ್ದು **3 ದಿನಗಳು ರ ಮುನ್ನ**
 *  ಸಕ್ರಿಯ ಸ್ಥಾಪನೆಗಳು **10 ಕ್ಕಿಂತ ಕಡಿಮೆ**
 *  ವರ್ಡ್ಪ್ರೆಸ್ ಆವೃತ್ತಿ ** 6.5 ಅಥವಾ ಹೆಚ್ಚಿನದು **
 *  **7.0** ವರೆಗೆ ಪರೀಕ್ಷಿಸಲಾಗಿದೆ
 *  PHP ಆವೃತ್ತಿ ** 7.4 ಅಥವಾ ಹೆಚ್ಚಿನದು **
 *  Language
 * [English (US)](https://wordpress.org/plugins/sl-cities-woo/)
 * ಟ್ಯಾಗ್‌ಗಳು
 * [checkout](https://kn.wordpress.org/plugins/tags/checkout/)[districts](https://kn.wordpress.org/plugins/tags/districts/)
   [postcode](https://kn.wordpress.org/plugins/tags/postcode/)[sri lanka](https://kn.wordpress.org/plugins/tags/sri-lanka/)
   [woocommerce](https://kn.wordpress.org/plugins/tags/woocommerce/)
 *  [ಸುಧಾರಿತ ನೋಟ](https://kn.wordpress.org/plugins/sl-cities-woo/advanced/)

## ರೇಟಿಂಗ್‌ಗಳು

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/sl-cities-woo/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/sl-cities-woo/reviews/)

## ಕೊಡುಗೆದಾರರು

 *   [ Thushara Lakshan ](https://profiles.wordpress.org/lakshan12/)

## ಬೆಂಬಲ

ಹೇಳಲು ಏನಾದರೂ ಸಿಕ್ಕಿದೆಯೇ? ಸಹಾಯ ಬೇಕೇ?

 [ಬೆಂಬಲ ವೇದಿಕೆಯನ್ನು ವೀಕ್ಷಿಸಿ](https://wordpress.org/support/plugin/sl-cities-woo/)