=== EHDM for WooCommerce ===
Contributors: ehdm
Requires at least: 6.8
Requires PHP: 8.1
WC requires at least: 10.6
WC tested up to: 10.6.2
Stable tag: 0.1.0

Native WooCommerce fiscalization tools for sending E-HDM electronic receipts.

== Installation ==

1. Upload the plugin zip in WordPress admin: Plugins > Add New > Upload Plugin.
2. Activate EHDM for WooCommerce.
3. Open WooCommerce > EHDM.
4. Enter E-HDM username and password on the Settings tab.
5. Configure fiscalization switch, automatic sending, trigger statuses, default unit and default DEP.
6. Click Test connection.
7. Fill EHDM product fields for each WooCommerce product or variation.

== Admin Tabs ==

WooCommerce > EHDM includes:

* Settings: credentials, fiscalization switch, defaults and connection test.
* Receipts History: loads GetPrintedReceiptsByPage and allows opening PDF receipts or reversing by receiptId.
* Returned Receipts: loads GetReturnedReceiptsByPage and shows reverse PDF links.
* Tools: runs documented API actions: PrintCopyByUniqueCode, GetHistoryByReceiptId, ReverseByReceiptId, SendEmail and SendSms.

== Required Product Fields ==

Each fiscalized product must have:

* ADG code
* GTIN, UPC, EAN, or ISBN in WooCommerce product data (used as E-HDM goodCode)
* Fiscal name (HY), maximum 50 characters
* Unit
* DEP or VAT exempt/default DEP configuration

== Order Actions ==

From the WooCommerce order screen, the plugin can:

* Send receipt to E-HDM
* Check receipt by unique code
* Sync receipt history
* Send receipt to customer email
* Send receipt by SMS when billing phone exists
* Reverse receipt

== Payment Mapping ==

Cash payment methods use cashAmount when payment method id is cod or cash.
All other payment methods use cardAmount.

== Notes ==

This package is prepared for testing. Real E-HDM credentials and a WooCommerce test store are required to verify API behavior.
