=== Partita Iva per Fattura Elettronica ===
Contributors: blacklotusconsulting
Tags: fattura-elettronica, fattura, woocommerce, checkout, partita-iva, codice-fiscale, pec, codice-univoco, vat-number, fatturazione-elettronica, fatture in cloud
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.1
Stable tag: 1.4.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Aggiunge al checkout di WooCommerce i campi fiscali necessari per la fatturazione elettronica italiana, con supporto HPOS e Checkout Blocks.

== Description ==

Partita IVA per Fattura Elettronica aggiunge al checkout di WooCommerce i campi fiscali comunemente richiesti dagli store italiani.

Il plugin salva i dati direttamente nell’ordine WooCommerce, così il gestore dello shop può utilizzarli nei propri flussi di fatturazione elettronica esterni a WordPress oppure con altri strumenti di fatturazione.

Funzionalità principali
* Campo Codice Fiscale
* Campo Partita IVA
* Campo PEC
* Campo Codice Univoco / Codice destinatario SDI
* Checkbox Richiedi fattura elettronica
* Selezione tipo cliente: Privato / Azienda
* Campo opzionale Ragione Sociale / Denominazione
* Campo opzionale Provincia
* Impostazioni amministrative per mostrare, nascondere o rendere obbligatori i campi
* Visualizzazione dati fiscali nella pagina di conferma ordine e nei dettagli ordine
* Modifica dei dati fiscali direttamente dall’amministrazione ordini di WooCommerce
* Inclusione dei dati fiscali nella normale email di nuovo ordine inviata all’amministratore/venditore
* Supporto per WooCommerce Checkout Blocks e Store API
* Compatibilità con WooCommerce HPOS

Questa versione gratuita è focalizzata sulla raccolta affidabile dei dati fiscali in WooCommerce.

= Pro version =

WP Partita IVA Pro è disponibile per gli store che necessitano anche della generazione documenti e dell’integrazione con Fatture in Cloud.

Funzionalità Pro:

Integrazione OAuth/API con Fatture in Cloud
Generazione manuale e automatica dei documenti dagli ordini WooCommerce
Sincronizzazione dei dati di riferimento da Fatture in Cloud
Elaborazione tramite coda e gestione tentativi automatici
Strumenti diagnostici e di supporto
Licenza premium e aggiornamenti privati

Scopri di più o acquista la versione Pro:
https://shop.blacklotus.eu/prodotto/wp-partita-iva-pro/

== Requirements ==

* WordPress 5.1 or later.
* PHP 7.1 or later.
* WooCommerce installed and active.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. The plugin is designed for WooCommerce checkout and WooCommerce orders.

= Is this plugin free? =

Yes. This repository and the WordPress.org version contain the free plugin.

= Does this plugin create PDF invoices or electronic invoices? =

No. The free plugin collects and stores the fiscal data needed for invoicing. It does not create PDF invoices and does not send invoices to SDI.

= Does it support WooCommerce Checkout Blocks? =

Yes. Version 1.4.0 adds support for WooCommerce Checkout Blocks and the Store API.

= Does it support HPOS? =

Yes. The plugin declares WooCommerce HPOS compatibility and stores fiscal data in a way that remains compatible with HPOS orders.

= Can I disable the Privato / Azienda customer type selection? =

Yes. The customer type selector can be disabled from the plugin settings.

= Can I make Ragione Sociale required? =

Yes. Version 1.4.0 adds an independent setting to require Ragione Sociale / Denominazione.

= Can I require PEC or Codice Univoco when the customer asks for an electronic invoice? =

Yes. Version 1.4.0 adds a setting to require at least one between PEC and Codice Univoco when electronic invoice is requested.

= Where can I get the Pro version? =

The Pro version is available from the Black Lotus shop:
https://shop.blacklotus.eu/prodotto/wp-partita-iva-pro/

== Installation ==

1. Carica la cartella del plugin in /wp-content/plugins/ oppure installa il file ZIP dalla schermata plugin di WordPress.
2. Attiva il plugin dal pannello amministrativo di WordPress.
3. Verifica che WooCommerce sia installato e attivo.
4. Apri le impostazioni del plugin e scegli quali campi fiscali mostrare o rendere obbligatori nel checkout.
5. Esegui almeno un ordine di test dopo ogni modifica ai requisiti dei campi.

== Screenshots ==

1. Plugin settings for fiscal checkout fields.
2. WooCommerce checkout fiscal fields.
3. Fiscal data in WooCommerce order details.

== Changelog ==
= 1.4.3 =
* Fixed required settings for Checkout Blocks invoice fields
* Fixed plugin version metadata
* Fixed Italian VAT validation algorithm

= 1.4.2 =
* Fix on VAT Validation function

= 1.4.1 =
* WP and Woo new version support

= 1.4.0 =

* Added support for WooCommerce Checkout Blocks and Store API.
* Added explicit WooCommerce HPOS and Checkout Blocks compatibility declarations.
* Added invoice fields to the WooCommerce new-order admin/vendor email.
* Added an independent setting to make Ragione Sociale / Denominazione required.
* Added an option to require PEC or Codice Univoco when electronic invoice is requested.
* Added plugin text domain and translation template.
* Changed VAT validation to allow optional country-prefixed VAT numbers such as IT, ES or FR.
* Removed backend CSV order export from plugin settings because it was outside plugin scope.
* Fixed electronic-invoice checkbox label in Checkout Blocks.
* Improved Privato / Azienda checkout layout.
* Hid Ragione Sociale / Denominazione for private customers.
* Added a Pro version link in plugin settings and plugin action links.
* Fixed Blocks checkout order metadata sync with legacy `_billing_*` fields.
* Fixed checkout timeout caused by recursive order saving in the admin order hook.
* Fixed saving invoice fields from the HPOS admin order page.
* Verified classic shortcode checkout compatibility.

= 1.3.4 =

* Added option to disable client type selection (Privato / Azienda).
* Added company name field (Ragione Sociale / Denominazione) for business customers.
* Added custom fields display in order details and thank-you page.
* Added option to show/hide Province field.
* Fixed field validation when customer type is disabled.
* Seller email is now sent immediately on new order.
* Added HPOS compatibility.

= 1.3.3 =

* Added WooCommerce HPOS compatibility.

= 1.3.2 =

* Added support for WordPress 6.4.1 and WooCommerce 8.2.2.

= 1.3.1 =

* Added support for WordPress 6.3.2 and WooCommerce 8.2.1.
* Fixed duplicated State/Province field in WooCommerce checkout.

= 1.3.0 =

* Added support for WooCommerce 8.2.0.
* Fixed previous invoice request preference not being respected.
* Added admin editing for fiscal fields in the order page.
* Added Privato / Azienda radio button with conditional required fields.

= 1.2.5 =

* Added support for WordPress 6.3.1 and WooCommerce 8.0.3.

= 1.2.4 =

* Added support for WordPress 6.3 and WooCommerce 8.0.3.

= 1.2.3 =

* Added support for WordPress 6.2 and WooCommerce 7.5.1.

= 1.2.2 =

* Added support for WordPress 6.0.2 and WooCommerce 6.8.2.

= 1.2.1 =

* Added more information to the readme file, plugin banner and plugin icon.

= 1.2 =

* Fixed incorrect stable tag.
* Escaped variables and options when output.

= 1.1 =

* Improved sanitization, escaping and validation.

= 1.0 =

* First release.

== Upgrade Notice ==

= 1.4.0 =

This version adds WooCommerce Checkout Blocks support and new invoice-field settings. After updating, review plugin settings and test checkout once.

= 1.3.4 =

This version adds new field settings. After updating, review the plugin settings.
