內容簡介
Rebel Studios Brazilian Checkout Fields for WooCommerce 外掛為巴西商店的 WooCommerce 結帳頁面新增必要欄位,包括 CPF、CNPJ、公司法定名稱等,並提供實時驗證、自動填充及數據整合等功能,解決商店在開立發票時的需求。
【主要功能】
• 實時驗證 CPF 和 CNPJ 的正確性
• 自動填充地址資訊
• 數據整合於訂單畫面及 REST API
• 支援經典及區塊結帳方式
• 欄位可選擇為必填、選填或禁用
• 隱私保護,查詢從伺服器進行
外掛標籤
開發者團隊
② 後台搜尋「Rebel Studios Brazilian Checkout Fields for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
Rebel Studios Brazilian Checkout Fields adds the fields a Brazilian store needs to the WooCommerce checkout — CPF, CNPJ, company legal name (Razão Social), RG, state registration (Inscrição Estadual), street number and neighbourhood (bairro) — and does three things that are usually missing:
Real validation. CPF and CNPJ are checked against the official check digits, in the browser and on the server. An invalid document never reaches the order.
Autofill. Type the CEP and the street, neighbourhood, city and state fill in. Type the CNPJ and the company’s legal name and address come with it.
The data goes where you need it. CPF, CNPJ and legal name appear on the order screen, in emails and in the REST API — ready for your invoicing (NF-e) integration. Collecting a document you cannot use later is the problem this plugin exists to solve.
The plugin’s interface is in Brazilian Portuguese. It is fully internationalized (i18n), so it can be translated into any language through translate.wordpress.org once published.
Every field is optional
Each field has three states: Disabled, Optional or Required. A store that sells digital products does not need to ask for a CPF; one that invoices companies needs a CNPJ and legal name and nothing else. You decide, without touching code.
Works with both checkouts
Compatible with the WooCommerce classic checkout and the block checkout, and with HPOS (High-Performance Order Storage). Data is stored the same way by both checkouts, so an invoicing integration only has to read one format.
On the block checkout, customers choose between individual (Pessoa Física) and company (Pessoa Jurídica), and see only the documents for that choice.
Privacy and reliability
CEP and CNPJ lookups are made from your server, not from the customer’s browser, and are cached. If a lookup service is down, the customer simply types the address — a purchase is never blocked by a third-party API.
External services
To fill an address from a postcode and a company from its registration number, this plugin sends the value the customer typed to two free, public Brazilian services. Every request is made from your server (never the customer’s browser), only when a customer enters a CEP or a CNPJ, and the response is cached on your site so the same value is not looked up twice. No data is ever sent to the makers of this plugin.
ViaCEP (https://viacep.com.br/)
Used to turn a Brazilian postcode into a street address. When a customer types an 8-digit CEP, that CEP — and nothing else — is sent to ViaCEP, which returns the street, neighbourhood, city and state. No personal data (name, email, document number) is sent. ViaCEP is a free public service that does not publish a separate terms-of-service or privacy-policy page; its usage information is on its website: https://viacep.com.br/.
BrasilAPI (https://brasilapi.com.br/)
Used to turn a company registration number into the company’s public details. When a customer types a 14-digit CNPJ (a public company registration number, not personal data), that CNPJ — and nothing else — is sent to BrasilAPI, which returns the company’s public registration data (legal name and registered address). BrasilAPI is a free, open-source community project. Its terms of use are published on its site: https://brasilapi.com.br/#termos-de-uso . It does not publish a separate privacy-policy page; the project and its source are documented at https://brasilapi.com.br/ .
The Diagnostics panel on the settings screen also sends one sample request to each service (at most once every 5 minutes) to show whether it is responding. It uses a fixed example CEP and CNPJ, never customer data.
