| 开发者 | tomppasalmi |
|---|---|
| 更新时间 | 2026年10月4日 18:04 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
y_kassa_get_order_data() and the y_kassa_order_data filter.y_kassa_checkout_fields, y_kassa_validation_result, y_kassa_meta_keys, y_kassa_display_rows).https://avoindata.prh.fi/opendata-ytj-api/v3/companies. The business ID entered by the customer is sent to look up the company's public register data (name, address, VAT registration, status). Terms / licence (CC BY 4.0), PRH privacy.
No other data (names, emails, addresses of the customer) is sent. Requests are made from your server only when a business ID is entered or an order is placed, and results are cached to minimise calls. Autofill can be turned off in the settings.
Privacy
Yes. Fields are registered with the WooCommerce Additional Checkout Fields API. On WooCommerce 9.9 and newer, WooCommerce itself shows and requires the company fields only when "I am buying as a company" is checked. On WooCommerce 8.9–9.8 the plugin hides the fields itself and enforces the required fields when the order is placed.
Tested with WooCommerce 8.9 and 11.1 on WordPress 6.5–7.1 and PHP 7.4–8.4, with both HPOS and legacy order storage.
Use y_kassa_get_order_data( $order ) in PHP. It returns the Business ID, company name, VAT ID, buyer reference and YTJ result for business orders (an empty array for consumer orders).
This plugin checks the format and derives the Finnish VAT ID from the Y-tunnus. Live validation against the EU VIES register is part of the optional Verkkokauppapaja B2B Checkout Pro add-on.
The autofill uses a read-only REST route that only returns public register data. It requires a nonce, is rate-limited per IP (60 lookups per 10 minutes, filter y_kassa_rate_limit) and only ever calls the fixed PRH address.
verkkokauppapaja-b2b-checkout). Settings, order data and filters are unchanged.y_kassa_checkout_fields, y_kassa_meta_keys, y_kassa_display_rows, y_kassa_has_toggle, y_kassa_script_data, y_kassa_company_response).y_kassa object in the WooCommerce REST API orders endpoint (read/write).wp_safe_remote_get without redirects and with a response size limit; input length limits on the lookup routes.