Linux 软件免费装
Banner图

Postali — Códigos postales de México

开发者 gomflo
更新时间 2026年9月28日 23:21
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce checkout address autocomplete mexico postal code

下载

1.0.0

详情介绍:

Your customers type their postal code (código postal) and the WooCommerce checkout fills in the state, the city or municipality, and shows a dropdown with every colonia (neighborhood) for that postal code. Fewer typos, fewer parcels returned for incomplete addresses. The data comes from the official SEPOMEX catalog (Correos de México), served by the free public Postali API: no signup, no API key, no quotas. The plugin interface is in Spanish, since it is built for stores that sell in Mexico. Features Where the colonia is stored By default, in Address line 2 (address_2), relabeled "Colonia" for Mexico. This is the most common convention in Mexican stores: line 1 holds street and number, line 2 holds the colonia. The colonia then shows up with no extra setup in emails, invoices, shipping labels, exports and any integration that reads the standard WooCommerce address. If you prefer a separate field, choose "Campo propio Colonia" in the settings. It is stored as an additional order field (_wc_billing/postali/colonia and _wc_shipping/postali/colonia, the same format the block checkout uses), and it is added to the formatted Mexican address in the order screen, emails and the thank-you page. Keep in mind that many shipping integrations only read address_2. Classic checkout and block checkout Settings Under WooCommerce > Settings > Postali: Optional credit link The plugin can show a small "Datos: Postali" link below the colonia field. It is off by default and only appears if you turn it on in the settings. The plugin works exactly the same without it.

安装:

  1. Install and activate WooCommerce.
  2. Upload the postali-codigos-postales folder to /wp-content/plugins/, or install it from Plugins > Add New.
  3. Activate the plugin.
  4. Review WooCommerce > Settings > Postali. It works out of the box: it fills state, city and colonia, and stores the colonia in Address line 2.

屏幕截图:

  • Classic checkout: a postal code with a single colonia selects it automatically. The postal code field is shown before the street for Mexico.
  • Settings under WooCommerce > Settings > Postali.

升级注意事项:

1.0.0 First release.

常见问题:

Do I need an API key or an account?

No. The Postali API is public and free.

What happens if the API does not respond?

The customer sees a notice and fills the address manually. Checkout is never blocked by a network failure, not even with server-side validation enabled.

Why is Ciudad de México stored with the code "DF"?

That is the code WooCommerce uses internally for Ciudad de México ("MX" is Estado de México). The plugin maps SEPOMEX state names to those codes; customers only see the name.

A colonia is missing from the list

Choose "Otra (escribirla a mano)" and type it. SEPOMEX takes a while to register new developments.

Does it work for Colombia or Spain?

The Postali API also has data for Colombia and Spain, but this version of the plugin only autocompletes Mexican addresses.

Can I point it at my own copy of the API?

Yes. The postali_cp_api_base PHP filter changes the base URL for both the browser lookups and the server-side validation.

更新日志:

1.0.0