=== EU Customs Fees for WooCommerce ===
Contributors: michaltry
Tags: customs, dropshipping, import duty, eu, ioss
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

EU 3 € import duty and 2 € handling fee per item category for parcels from outside the EU – charged at checkout or shown as payable on delivery.

== Description ==

Since **1 July 2026** every distance-sale parcel worth up to 150 € that enters the EU pays a **flat customs duty of 3 € per item category** (Council Regulation (EU) 2026/382). From its application date (expected 1 November 2026) an **EU customs handling fee of 2 € per item category** is added on top – for parcels of any value (Regulation (EU) 2026/2108 Art. 20, Commission Delegated Regulation C(2026) 6694).

If you dropship from China, Turkey or the UK, every parcel now costs more. This plugin calculates these charges in your WooCommerce cart, exactly the way customs counts them.

= How customs counts =

* **Per parcel, not per order.** Products dispatched from different countries form separate parcels; the 150 € limit and the item count apply to each parcel.
* **Per item category, not per piece.** An item category is one tariff line: five identical T-shirts count once, a T-shirt and a watch count twice.
* **Value without shipping and VAT.** The 150 € limit is checked against the net value of the goods.
* **EU warehouse = no charges.** Goods shipped from a warehouse inside the EU are not imported at delivery.

= Features =

* HS code, country of origin and dispatch country per product and variation.
* Reuses the **Germanized** HS code and country of manufacture fields if you already filled them.
* Products imported with **ALD – AliExpress Dropshipping** are recognised as shipped from China.
* Two modes: **charge at checkout** (separate fees for duty and handling fee, each with its own VAT setting) or **information only** (customer pays on delivery).
* Works with the **block cart and checkout** and the classic shortcode checkout, and with HPOS.
* Notice on product pages for goods shipped from outside the EU.
* Customs data is frozen on every order line; the calculation and rules version are stored with the order.
* **CSV export** per parcel for your forwarder or IOSS intermediary (HS code, origin, SKU, quantity, value, duty, handling fee).
* HS code, origin and dispatch country columns in the WooCommerce product CSV import/export.
* Item granularity selectable: HS6 (H7 declaration), CN8 (H6) or TARIC10 + origin (H1).
* The flat duty and the handling fee can each be switched on or off (e.g. if your broker bills one of them separately).
* All amounts and dates are settings – ready for changes to the rules.
* Translations: English, German (Sie), Polish.

= Not legal advice =

The plugin calculates charges based on the regulations and the European Commission guidance of 5 October 2026. It does not replace advice from a customs broker or tax adviser. Check the start date of the handling fee in the Official Journal of the EU.

== Installation ==

1. Install and activate the plugin.
2. Go to **WooCommerce → Settings → EU customs**.
3. Choose who pays (checkout or on delivery) and your default dispatch country (e.g. China for dropshipping).
4. Add HS codes to your products (Shipping tab) or import them via CSV.

== Frequently Asked Questions ==

= What if a product has no HS code? =

It is counted as its own item category. This is the safe side: customs will not group different goods.

= Should I charge VAT on the fees? =

By default the duty is charged without VAT and the handling fee with VAT, following the Commission's VAT addendum of 16 June 2026 and customs guidance of 5 October 2026. The two documents are not fully consistent, so both are settings. Ask your tax adviser.

= My store does not use EUR. =

Set the exchange rate in the settings. The regulation sets all amounts in EUR.

= Does it work with Germanized? =

Yes. The plugin reads Germanized's HS code and country of manufacture and keeps its fees out of Germanized's proportional fee taxation, so they follow the plugin's own VAT settings.

== Screenshots ==

1. Block checkout: EU import duty and handling fee as separate lines (here in German, 3 item categories from China).
2. Product page notice for goods shipped from outside the EU.
3. Product fields: HS code, country of origin and dispatch country.
4. Settings: who pays, default dispatch country, item granularity, amounts and dates with their legal basis.
5. Order: customs data frozen on every line; the yoga mat ships from an EU warehouse and is not charged.
6. Order meta box: parcel, item categories, value, charges and the rules version used.

== Changelog ==

= 0.2.0 =
* Developer hooks: eucf_export_header, eucf_export_row, eucf_eur_rate.
* Separate on/off switches for the flat duty and the handling fee.

= 0.1.0 =
* Short fee names in the order summary, e.g. "EU import duty (3 × 3,00 €)".
* First release: 3 € flat duty and 2 € handling fee per item category, per parcel; DDP and DAP modes; block and classic checkout; order audit data; CSV export.
