Portugal States (Distritos) for WooCommerce


This plugin adds the 18 Portuguese “States” (known as “Distritos”) plus the 2 Autonomous Regions (known as “Regiões Autónomas”, Madeira and Açores) to WooCommerce.

Also sets the right name for “Districts” and the correct “Postcode”/”City” order and the correct address format for Portugal.

And… that’s pretty much it.


  • Adds the Portuguese “States”, known as “Distritos”, to WooCommerce
  • Sets the correct address format for Portugal, including the correct “Postal Code”/”City” positioning on the checkout

Do your customers still write the full postal code manually on the checkout?

Activate the automatic filling of the postal code at the checkout, avoiding incorrect data at the time of sending, with our plugin Portuguese Postcodes for WooCommerce

The Portuguese Postcodes plugin can also do a district-postcode cross validation on checkout and guarantee they match.

Are you already issuing automatic invoices on your WooCommerce store?

If not, get to know our new plugin: Invoicing with InvoiceXpress for WooCommerce


Use the included automatic install feature on your WordPress admin panel and search for “Portugal States (Distritos) for WooCommerce”.


I need help, can I get technical support?

This is a free plugin. It’s our way of giving back to the wonderful WordPress community.

There’s a support tab on the top of this page, where you can ask the community for help. We’ll try to keep an eye on the forums but we cannot promise to answer support tickets.

If you reach us by email or any other direct contact means, we’ll assume you are in need of urgent, premium, and of course, paid-for support.

After version 3.0.0 the Postcode and Postcode City are showing side by side on the checkout and I want it the way it was before. What do I revert it?

Add this to your (child) theme’s functions.php file:
add_filter( ‘woocommerce_portugal_postcode_class’, function( $class ) {
return array( ‘form-row-wide’ );
add_filter( ‘woocommerce_portugal_city_class’, function( $class ) {
return array( ‘form-row-wide’ );


9 Ottobre 2019
Si tu tienda incluye envíos a Portugal este es el plugin que necesitas. Tendrás en las direcciones de cliente la opción de poder elegir el distrito (lo equivalente a las provincias de España), algo que WooCommerce no incluye por defecto.
24 Luglio 2019
Obrigatório para ecommerce em Portugal no wordpress, obrigado pelo excelente trabalho!!
3 Gennaio 2019
Plugin simples, mas de grande utilidade. Fiquei horas a tentar configurar as localidades e zonas com custos diferentes em minha loja no woocommerce, e por acaso encontrei este plugin, que consegui confirgurar em minutos... Parabéns e obrigado por este plugin 🙂
11 Dicembre 2016
A must have plugin if you're configuring shipping methods in WooCommerce for Portuguese “Distritos”. Thank you!
Leggi tutte le recensioni di 7

Contributi e sviluppo

“Portugal States (Distritos) for WooCommerce” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.


“Portugal States (Distritos) for WooCommerce” è stato tradotto in 3 lingue. Grazie ai traduttori per i loro contributi.

Traduci “Portugal States (Distritos) for WooCommerce” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il Codice segui il Repository SVN iscriviti al Log delle Modifiche. Puoi farlo tramite RSS con un lettore di feed.

Changelog (registro delle modifiche)

3.0.3 – 2021-05-14

  • Fix the order in which we set the address format because other plugin’s changes, like EU VAT Assistant, were being overriden
  • New woocommerce_portugal_localisation_address_formats_priority filter to change the hook priority for the address format
  • Tested with WooCommerce 5.3.0

3.0.2 – 2021-04-14

  • Removed the information about WooCommerce 5.2.0 from the readme.txt file as the change was reverted on WooCommerce 5.2.1

3.0.1 – 2021-04-14

  • Important information on readme.txt about WooCommerce 5.2.0 and the fact they now include the Portuguese Districts.

3.0.0 – 2021-04-08

  • Complete code refactoring
  • Show Postcode and Postcode City side by side on the checkout and added two new filters to change it: woocommerce_portugal_postcode_class and woocommerce_portugal_city_class
  • Changed the (english) city label from “Postcode Town / City” to “Postcode City” (no changes in Portuguese)
  • Added support information to the Frequently Asked Questions readme section
  • Requires WooCommerce 3.0
  • Tested with WordPress 5.8-alpha-50689 and WooCommerce 5.2.0-rc.2

2.1.9 – 2021-03-10

  • Tested with WordPress 5.8-alpha-50516 and WooCommerce 5.1.0


  • Tested with 5.6-beta3-49562 and WooCommerce 4.8.0-beta.1



  • Tested with WordPress 5.3.3-alpha-47419 and WooCommerce 4.0.1

  • Changes on the InvoiceXpress banner

  • Fix version number


  • Hide the InvoiceXpress nag if the invoicing is already installed and active
  • Tested with WordPress 5.3.1-alpha-46798 and WooCommerce 3.8.1


  • Change InvoiceXpress nag interval from 30 to 90 days
  • Tested with WordPress 5.2.4-alpha-46074 and WooCommerce 3.8.0-beta.1
  • Requires PHP 5.6

  • readme.txt small fix


  • Tested with WooCommerce 3.5.2
  • Bumped WC tested up tag
  • Bumped Requires at least tag


  • Tested with WooCommerce 3.5
  • Bumped WC tested up to tag


  • Added the woocommerce_portugal_postcode_priority filter to allow overriding the “Postal Code” priority value


  • Fix “Postal Code”/”City” fields order on the checkout on newer WooCommerce versions
  • The “City” field label is now “Postcode Town / City” on the checkout
  • New woocommerce_portugal_city_label filter to be able to change the “City” field label
  • New woocommerce_portugal_state_label filter to be able to change the “District” field label
  • New woocommerce_portugal_state_required filter to be able to set the “District” field as not required
  • Bumped WC tested up to tag


  • Removed the district from the plain text address format for Portugal, as we do not use it on a day to day basis: “{name}\n{company}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}” (can be restored via the woocommerce_portugal_address_format_include_state filter)
  • Better coding standards

  • Fixed readme.txt

  • Tested with WooCommerce 3.3
  • Bumped Tested up to tag


  • Removed the translation files from the plugin lang folder (the translations are now managed on WordPress.org’s GlotPress tool and will be automatically downloaded from there)
  • Tested with WooCommerce 3.2
  • Added WC tested up to tag on the plugin main file
  • Bumped Tested up to tag


  • Tested with WooCommerce 3.0.0-rc.2
  • Bumped Tested up to tag
  • Portuguese translation update


  • Bumped Tested up to tag


  • Sets the correct Portuguese address format: “{name}\n{company}\n{address_1}\n{address_2}\n{postcode} {city}\n{state}\n{country}”


  • Bumped “Requires at least” and “Tested up to” tags


  • The district is now required by default, as is on all the other countries that have states loaded by the WooCommerce core


  • Important bug fix: No longer overrides other countries states


  • WordPress Multisite support


  • Now also sets the right name for “Districts” and the correct “Postal Code”/”City” order


  • Initial release.