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.
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.
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.
This plugin uses ViaCEP (https://viacep.com.br) to fill in street, district
and city from the postal code typed by the customer.
To turn the lookup off, use this filter:
add_filter( 'ballitech_cf_buscar_cep', '__return_false' );