Portugal States (Distritos) for WooCommerce

Descripción

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.

Y … eso es más o menos todo.

Foto de banner por Nilo Velez.

Características:

  • 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

¿Tus clientes siguen escribiendo manualmente la dirección completa al finalizar la compra?

Activate the automatic filling of the address details at the checkout, including street name and neighbourhood, based on the postal, avoiding incorrect data at the time of shipping, 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.

¿Estas emitiendo facturas automáticas en tu tienda WooCommerce?

Si no, conoce nuestro nuevo plugin: Invoicing with InvoiceXpress for WooCommerce

Other (premium) plugins

Already know our other WooCommerce (premium) plugins?

Instalación

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

FAQ

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’ );
});

Is this plugin compatible with the new WooCommerce High-Performance Order Storage?

Yes.

Is this plugin compatible with the new WooCommerce block-based Cart and Checkout?

Yes.

Is this plugin compatible with Express Checkout, like Apple and Google Pay?

Apple and Google are not requesting the “Distrito” field in Apple Pay addresses, which causes checkout to fail if you set your shipping zones with “Distritos”.
So, if you’re using these methods, we recommend you set your shipping zones with postcode intervals; for example, one zone for Portugal, restricted to postcodes 0000000…8999999, and another for the islands, restricted to 9000000…9999999.
You can keep using this plugin, but the shipping zones should be set with postcodes.

Alternatively, version 7.0 of our “Portuguese Postcodes for WooCommerce” plugin, alongside “WooCommerce Stripe Payment Gateway” version 10.2.0 or above, fixes this.

Or you can use Apple Pay and Google Pay via the ifthenpay gateway with our plugin, which fetches the address from the WooCommerce checkout.

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 need, premium, and of course, paid-for support.

Where do I report security vulnerabilities found in this plugin?

You can report any security bugs found in the source code of this plugin through the Patchstack Vulnerability Disclosure Program. The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin.

Reseñas

29 de julio de 2022 1 respuesta
The plugin has been very well developed. It fulfills everything you need to make shipments in portugal, as well as or eliminate shipping zones. The support has been very fast and efficient.
9 de octubre de 2019 1 respuesta
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 de julio de 2019
Obrigatório para ecommerce em Portugal no wordpress, obrigado pelo excelente trabalho!!
3 de enero de 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 de diciembre de 2016
A must have plugin if you’re configuring shipping methods in WooCommerce for Portuguese “Distritos”. Thank you!
Leer todas las 9 reseñas

Colaboradores y desarrolladores

«Portugal States (Distritos) for WooCommerce» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Portugal States (Distritos) for WooCommerce» está traducido en 4 idiomas. Gracias a los traductores por sus contribuciones.

Traduce «Portugal States (Distritos) for WooCommerce» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

4.2 – 2025-12-11

  • [TWEAK] Add information to the readme file regarding instant payment methods not requesting “Distrito” for Portuguese addresses, and the fix available by using Portuguese Postcodes for WooCommerce
  • [DEV] Tested with WordPress 7.0-alpha-61365 and WooCommerce 10.4.0

4.1 – 2025-10-05

  • [TWEAK] Add information to the readme file regarding instant payment methods not requesting “Distrito” for Portuguese addresses
  • [DEV] Tested up to WordPress 6.9-beta2-61099 and WooCommerce 10.3.4

4.0 – 2025-06-24

  • [TWEAK] Improve the mechanism to keep the “Portuguese Postcodes for WooCommerce” admin notice from showing to the same user in the next 120 days after dismissal
  • [DEV] Tested up to WordPress 6.9-alpha-60342 and WooCommerce 10.0.0-rc.1

3.9 – 2025-04-14

  • [NEW] We are now called Naked Cat Plugins 😻
  • [DEV] Requires WordPress 5.8, WooCommerce 7.1, and PHP 7.2
  • [DEV] Tested with WordPress 6.8-RC3-60146 and WooCommerce 9.8.1

3.8 – 2024-10-07

  • [FIX] Remove unused postcode_before_city locale property which was causing a PHP notice on the blocks checkout
  • [DEV] Requires WooCommerce 7.0
  • [DEV] Tested with WordPress 6.7-beta1-59158 and WooCommerce 9.4.0-beta.2

3.7 – 2024-04-20

  • [TWEAK] Compatibility with checkout block custom fields
  • [DEV] Tested with WordPress 6.6-alpha-58011 and WooCommerce 8.9.0-dev

3.6 – 2024-03-27

  • [DEV] Set Requires Plugins tag to woocommerce
  • [DEV] Tested with WordPress 6.5-RC3-57875 and WooCommerce 8.8.0-beta.1

3.5 – 2023-12-12

  • Declare WooCommerce block-based Cart and Checkout compatibility
  • Requires WooCommerce 5.0 and WordPress 5.4
  • Tested with WordPress 6.5-alpha-57159 and WooCommerce 8.4.0-rc.1

3.4.1 – 2023-07-07

  • Fix some strings and links

3.4 – 2023-07-06

  • Requires WooCommerce 5.0
  • Tested with WordPress 6.3-beta3-56143 and WooCommerce 7.9.0-rc.2

3.3 – 2022-11-09

  • Tested and confirmed WooCommerce HPOS compatibility
  • Tested with WordPress 6.2-alpha-54748 and WooCommerce 7.1

3.2.0 – 2022-06-30

  • New brand: PT Woo Plugins 🥳
  • Requires WordPress 5.0, WooCommerce 3.0 and PHP 7.0
  • Tested with WordPress 6.1-alpha-53556 and WooCommerce 6.7.0-beta.2

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

2.1.8

  • Probado con WordPress 5.6-beta3-49562 y WooCommercce 4.8.0-beta.1

2.1.7

2.1.6

  • Probado con WordPress 5.3.3-alpha-47419 y WooCommerce 4.0.1

2.1.5.2

  • Cambios en el banner de InvoiceXpress

2.1.5.1

  • Corregido el número de la versión

2.1.5

  • Ocultar el aviso de InvoiceXpress si la facturación ya está instalada y activa
  • Probado con WordPress 5.3.1-alpha-46798 y WooCommerce 3.8.1

2.1.4

  • Cambiar el intervalo del aviso de InvoiceXpress de 30 a 90 días
  • Probado con WordPress 5.2.4-alpha-46074 y WooCommerce 3.8.0-beta.1
  • Requiere PHP 5.6

2.1.3.1

  • Pequeña corrección del archivo «readme.txt»

2.1.3

  • Probado con WooCommerce 3.5.2
  • Desechada la etiqueta Probado hasta WC
  • Desechada la etiqueta Necesita al menos

2.1.2

  • Probado con WooCommerce 3.5
  • Desechada la etiqueta Probado hasta WC

2.1.1

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

2.1

  • 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
  • Desechada la etiqueta Probado hasta WC

2.0

  • 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)
  • Mejores estándares de codificación

1.5.3.2

  • Corrección del readme.txt

1.5.3.1

  • Probado con WooCommerce 3.3
  • Desechada la etiqueta Probado hasta

1.5.3

  • Eliminados los archivos de traducción de la carpeta lang del plugin (las traducciones ahora son gestionadas en la herramienta GlotPress de WordPress.org y se descargarán automáticamente desde allí)
  • Probado con WooCommerce 3.2
  • Añadida la etiqueta WC tested up to al archivo principal del plugin
  • Desechada la etiqueta Probado hasta

1.5.2

  • Probado con WooCommerce 3.0.0-rc.2
  • Desechada la etiqueta Probado hasta
  • Actualización de la traducción al portugués

1.5.1

  • Desechada la etiqueta Probado hasta

1.5

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

1.4.1

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

1.4

  • El distrito ahora es obligatorio por defecto, como en todos los otros países que tienen provincias cargadas por el núcleo de WooCommerce

1.3

  • Importante corrección de fallo: Ya no anula los estados de otros países

1.2

  • Compatible con WordPress Multisitio

1.1

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

1.0

  • Versión inicial