
內容簡介
Ballitech Checkout Fields for WooCommerce 外掛專為巴西商店設計,提供結帳所需的額外欄位,包括個人類型、CPF、CNPJ、州登記、街道號碼和區域,確保 WooCommerce 用戶能夠順利完成交易。
【主要功能】
• 支援區塊結帳,無需額外操作
• 接受字母數字的 CNPJ 編號
• 自動導入現有客戶記錄
• 地址自動填寫功能,使用巴西郵政編碼
• CPF 和 CNPJ 的檢查碼驗證
• 兼容 WooCommerce 8.9 或更新版本
外掛標籤
開發者團隊
② 後台搜尋「Ballitech Checkout Fields for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
This plugin adds the fields a Brazilian store needs at checkout and that
WooCommerce does not ship with: person type, CPF, CNPJ, state registration
(inscricao estadual), street number and district.
Three things set it apart from the plugins that came before it.
1. It works in the block checkout.
WooCommerce replaced its checkout with one built on blocks. Plugins written for
the old checkout simply draw nothing there: the customer reaches the payment
step and there is no CPF field at all. This plugin uses the official additional
checkout fields API, the same one WooCommerce itself uses, so the fields show up
in both checkouts without workarounds.
2. It accepts the alphanumeric CNPJ.
Since 31 July 2026 the Brazilian federal tax authority issues CNPJ numbers that
contain letters (Normative Instruction RFB 2.229/2024). The identifier still has
14 positions, but the first 12 may include letters; only the 2 final check
digits remain numeric. A validator that accepts digits only will reject a
legitimate company at checkout, and the sale is lost without anyone finding out
why.
The validation rule here was checked during development against 200,000 random
numeric CNPJ numbers plus six real, publicly known ones: the new algorithm
accepts everything the old one accepted, with no divergence. The plugin also
ships a diagnostics page that runs a short validator battery inside your own
store, so you can see the rule working on your installation.
3. You can move off the old plugin without losing data.
Stores already running Brazilian Market on WooCommerce have the CPF stored in
_billing_cpf, and the whole ecosystem reads it from there: invoicing software,
payment gateways, themes, export spreadsheets. This plugin writes to the same
keys, in addition to the new ones. Nothing that used to work stops working
when you switch.
Existing customer records are imported automatically, in batches, without
locking up the admin.
Address autofill from the CEP
Type the Brazilian postal code and the street, district and city fill
themselves, in the block checkout and in the classic one alike. The lookup uses
ViaCEP, needs no key and no account.
It only writes into fields that are still empty, so it never erases something
the customer typed. If the CEP is unknown, or ViaCEP is unreachable, nothing
happens and the person fills the address by hand: the checkout is never blocked
by a lookup. Stores that prefer to turn it off can return false from the
ballitech_cf_buscar_cep filter.
Included fields
Person type (individual or company), which shows either CPF or CNPJ
CPF, with check digit validation
CNPJ, numeric and alphanumeric, with validation
State registration (inscricao estadual)
Street number and district, on both billing and shipping, so the shipping
label comes out right
Input masks for CPF, CNPJ, postal code and phone
Address lookup from the Brazilian postal code (CEP)
Compatibility
Block checkout and classic checkout
HPOS (High-Performance Order Storage), declared and tested
WooCommerce 8.9 or newer
Is there a paid version?
Yes, and this plugin is complete without it. Everything described above is free
and stays free: the fields, the validation, the alphanumeric CNPJ, the migration
and the postal code lookup.
Ballitech Checkout Fields Pro adds one thing only: it looks the CNPJ up at the federal
tax authority and fills in company name, address, district and postal code by
itself, warning you when the company is no longer active. It is a separate
plugin, distributed outside this directory, and nothing here depends on it.
External services
This plugin uses ViaCEP (https://viacep.com.br) to fill in street, district
and city from the postal code typed by the customer.
What is sent: the postal code typed by the customer, and nothing else.
When: at the moment the customer finishes typing the 8 digits, from their
own browser. The store server does not take part in the request.
Terms of use and privacy policy: https://viacep.com.br
To turn the lookup off, use this filter:
add_filter( 'ballitech_cf_buscar_cep', '__return_false' );
