=== VIESAC – Free VAT Validation for WooCommerce ===

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

Free VAT validation for WooCommerce checkout with audit-ready VIESAC certificates for B2B orders.

== Description ==

VIESAC adds free VAT validation to WooCommerce checkout. It validates EU, Norwegian, Swiss, and Northern Ireland VAT numbers and stores VIESAC certificates for audit-ready B2B orders.

= Features =

* **Free unlimited VAT validation** - Validate VAT numbers at WooCommerce checkout
* **15 VIESAC audits per month** - Full audits with VIES certificate storage
* **Lifetime storage** - VIES certificates stored permanently
* **EU VIES compliance** - VAT number validation for EU businesses
* **B2B tax exemption** - Automatic WooCommerce tax removal when VAT is valid
* **Certificate download** - PDF certificate available in order details
* **Company and VAT fields** - Adds company name and VAT number fields to checkout
* **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), Norway (NO), and Switzerland (CH).

= 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. WooCommerce order page with verified VAT status and VIESAC certificate download button
2. VIESAC configuration page for API key and audit usage
3. WooCommerce checkout with company name, VAT number, and tax-exempt B2B total

== Changelog ==

= 1.0.4 =

* Add Norway and Switzerland VAT validation support
* Add WordPress.org plugin icons, banner, and screenshots
* Sharpen readme copy around free VAT validation, VAT number checkout fields, B2B tax exemption, and certificate storage

= 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.4 =

Adds Norway and Switzerland VAT validation support and WordPress.org visual assets.

= 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.
