=== VIESAC ===

Contributors: viesac
Tags: woocommerce, vat, vies, b2b, tax
Requires at least: 5.9
Tested up to: 6.9
Stable tag: 1.0.3
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Validate EU VAT numbers in WooCommerce checkout and store VIES certificates for audit-ready B2B orders.

== Description ==

VIESAC adds EU VAT number validation to WooCommerce. It validates VAT numbers against the official EU VIES database and stores certificates for B2B orders.

= Features =

* **Free unlimited VAT validation** - Validate any EU VAT number at checkout
* **15 VIESAC audits per month** - Full audits with VIES certificate storage
* **Lifetime storage** - VIES certificates stored permanently
* **EU VIES compliance** - Uses official VIES service
* **B2B tax handling** - Automatic B2B tax exemption when VAT is valid
* **Certificate download** - PDF certificate available in order details
* **Checkout blocks support** - Works with WooCommerce Blocks
* **HPOS compatible** - Compatible with WooCommerce Custom Order Tables

= Supported countries =

All EU member states plus Northern Ireland (XI).

= Getting started =

1. Install and activate the plugin.
2. Go to WooCommerce -> VIESAC.
3. Get your free API key from [https://viesac.eu/app/api](https://viesac.eu/app/api).
4. Enter the API key and save.

= Languages =

VIESAC is available in 25+ languages: English, German, French, Spanish, Italian, Polish, Dutch, Romanian, Greek, Czech, Swedish, Hungarian, Portuguese, Bulgarian, Danish, Finnish, Slovak, Croatian, Latvian, Estonian, Lithuanian, Slovenian, Russian, Turkish, Arabic, Ukrainian.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/viesac/`, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the `Plugins` screen in WordPress.
3. Ensure WooCommerce is installed and active.
4. Go to WooCommerce -> VIESAC and enter your API key from [https://viesac.eu/app/api](https://viesac.eu/app/api).

== Frequently Asked Questions ==

= Do I need to pay? =

VAT validation is free. You get 15 VIESAC audits per month (full audits with certificate storage) free of charge. Paid plans offer more audits.

= What is an audit? =

An audit is a full validation that creates and stores a VIES certificate for the order. VAT number checks at checkout are unlimited and free.

= Does it work with WooCommerce Blocks? =

Yes. VIESAC is compatible with WooCommerce Blocks checkout.

== External services ==

This plugin connects to the VIESAC API to validate VAT numbers, retrieve account usage information, and optionally create audit records with certificate storage.

It sends data to `https://viesac.eu` only when a store administrator enters an API key and the plugin performs one of these actions:

* VAT validation and audit creation via `https://viesac.eu/api/v1/audits`
* Account and usage lookup via `https://viesac.eu/api/v1/account`

Depending on the action, the plugin may send:

* VAT country code and VAT number
* Company name
* Company address
* Order number
* Order audit details in XML format for certificate generation

Service provider documentation:

* Privacy Policy: [https://viesac.eu/privacy-policy](https://viesac.eu/privacy-policy)
* Terms of Service: [https://viesac.eu/terms-of-service](https://viesac.eu/terms-of-service)

== Screenshots ==

1. VIESAC settings page
2. VAT field at checkout
3. Order details with VIESAC status and certificate download

== Changelog ==

= 1.0.3 =

* Clean up WordPress.org scanner issues without changing checkout behavior
* Add missing plugin translations for Company name fields across all bundled locales
* Rebuild translation files for verified runtime loading in WordPress
* Harden admin output escaping and checkout/order input sanitization
* Normalize plugin file line endings and refine PHPCS-safe request handling in checkout/order flows

= 1.0.2 =

* Add best-effort fallback VAT field injection for custom WooCommerce checkout themes
* Re-inject VAT field after checkout AJAX updates and DOM re-renders
* Improve compatibility with custom theme checkout wrappers such as Avada-style layouts
* Keep WooCommerce Blocks behavior separate from classic/custom theme fallback logic

= 1.0.1 =

* Update text domain and WordPress compatibility metadata
* Add WooCommerce dependency header
* Document external API service usage for WordPress.org review
* Clean plugin copy for UTF-8 safe packaging

= 1.0.0 =

* Initial release
* VAT validation at checkout
* 15 free VIESAC audits per month
* VIES certificate download
* Admin settings page
* 25+ language translations

== Upgrade Notice ==

= 1.0.3 =

Recommended update for WordPress.org packaging cleanup, improved translation coverage, and safer metadata handling.

Adds better checkout compatibility for custom WooCommerce themes and builders.

= 1.0.1 =

WordPress.org compatibility and packaging cleanup release.
