plugin-icon

Sri Lankan Cities for WooCommerce

제작자: Thushara Lakshan·
Adds Sri Lanka's 25 districts to WooCommerce checkout, suggests cities for the chosen district, and autofills postal codes.
버전
1.0.0
최근 업데이트일
Jul 3, 2026
Sri Lankan Cities for WooCommerce

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.

무료유료 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 7.0
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.