=== ProntoSpedire.it — Shipping ===
Contributors: prontospedire
Tags: shipping, woocommerce, ups, dhl, fedex
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 7.0
WC tested up to: 9.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-time courier rates (UPS, DHL, FedEx, GLS, BRT) in WooCommerce checkout. Automatic labels, tracking and customs invoices.

== Description ==

Integrate **ProntoSpedire.it** into your WooCommerce store to offer real-time shipping rates from major express couriers, with savings of up to 40% compared to standard list prices.

= What the plugin does =

* **Live rates at checkout**: customers see UPS, DHL, FedEx, GLS, and BRT options sorted by price or speed, with delivery time estimates.
* **Automatic shipment creation**: when a WooCommerce order moves to "Processing", the shipment is created on ProntoSpedire.it and the label becomes downloadable from the order panel.
* **Automatic tracking**: the tracking number is added to the order completion email sent to the customer.
* **Volumetric weight**: calculated automatically from product dimensions.
* **Configurable markup**: add a percentage to the shipping cost before showing it to the customer.
* **Free shipping threshold**: configurable above a cart total.
* **Automatic commercial invoice**: for extra-EU orders the plugin generates the customs invoice required by UPS Paperless.
* **UPS Access Points**: customers can choose to receive the package at a UPS Access Point instead of their home address.
* **Prepaid wallet with auto top-up**: shipments are paid automatically from your ProntoSpedire credit. Recharge from the settings page and, if you like, enable auto top-up: when the balance drops below your threshold we charge your saved method (SEPA Direct Debit or card) and refill the wallet — so shipment creation never gets blocked.

= Prepaid wallet =

Shipments created from your store are **charged from the prepaid credit** of the ProntoSpedire account tied to your API Key — no per-order card payment. In **WooCommerce → ProntoSpedire.it** you can:

* see your current balance;
* recharge instantly (the first recharge also authorises a reusable SEPA/card mandate);
* enable **automatic top-up**: below a chosen balance threshold we charge a chosen amount to your mandate and credit the wallet.

If credit runs out, the shipment is not created and an explanatory note is added to the order so you know to recharge.

= Account required =

The plugin requires an account on [ProntoSpedire.it](https://www.prontospedire.it). Registration is free, you only pay for the shipments you create. Negotiated rates are already discounted up to 40% compared to courier counter prices.

= Languages =

The plugin admin interface is currently in Italian, with English fallback. Customer-facing strings (checkout labels, emails) follow the active site language.

== Installation ==

1. Install the plugin via **Plugins → Add New** by searching for "ProntoSpedire", or upload the zip from **Plugins → Add New → Upload Plugin**.
2. Activate the plugin.
3. Go to **WooCommerce → ProntoSpedire.it** and enter the server URL (`https://www.prontospedire.it` by default) and your API Key.
4. Fill in the sender details (company name, address, city, ZIP, country, phone).
5. Go to **WooCommerce → Settings → Shipping** and add a zone with the "ProntoSpedire.it" method.
6. Optional: enable automatic shipment creation when an order moves to "Processing".

== Frequently Asked Questions ==

= Do I need a contract with the couriers? =

No. ProntoSpedire.it negotiates volume-based rates on behalf of its customers. You pay only for the shipments you create, with no contracts, subscriptions, or minimum volumes.

= How do I get the API Key? =

After creating an account on ProntoSpedire.it, go to **Settings → API Keys** and generate a new key. Copy it immediately: for security reasons it cannot be recovered later.

= Are checkout rates live? =

Yes. Whenever a customer fills in the shipping address, the plugin calls the ProntoSpedire API and shows the up-to-date price for the actual weight and zone.

= What happens if ProntoSpedire.it is offline? =

The plugin silently returns no rates at checkout. Existing shipments continue to be tracked normally. It is good practice to configure a fallback shipping method.

= Can I add a markup to the displayed prices? =

Yes. In the plugin settings you can add a percentage markup that is applied before showing the price at checkout.

= Does the plugin handle international extra-EU shipments? =

Yes. For orders to non-EU countries the plugin automatically generates the commercial invoice (UPS Paperless) and the required customs documentation.

= Can I disable automatic shipment creation? =

Yes. In the settings you can choose whether to create the shipment automatically when the order status changes, or manually by clicking a button in the order panel.

== Screenshots ==

1. Plugin configuration screen in WooCommerce
2. Real-time courier rates at checkout (customer view)
3. WooCommerce order panel with clickable tracking number

== Changelog ==

= 1.4.0 =
* Added: resale pricing panel — choose how much to charge customers (add a percentage, a fixed amount, or set your own prices per weight bracket and zone).
* Added: cost calculator — enter a test parcel to see your ProntoSpedire cost and the price the customer would pay with your markup.

= 1.3.0 =
* Added: guided onboarding on activation — you are prompted to sign in or create a free ProntoSpedire.it account and connect your API key in 3 steps.
* Added: setup reminder notice until the plugin is configured.

= 1.2.0 =
* Added: prepaid wallet — shipments are charged automatically from your ProntoSpedire credit.
* Added: automatic top-up (recurring SEPA Direct Debit or card mandate via Mollie) when the balance drops below a threshold.
* Added: wallet panel in the settings page (balance, manual recharge, auto top-up configuration).
* Improved: on insufficient credit the shipment is not created and the order gets an explanatory note.

= 1.1.0 =
* Added: UPS Access Point support for delivery outside the home address.
* Added: automatic commercial invoice generation for extra-EU orders.
* Improved: WooCommerce 9.4 compatibility verified.
* Fixed: volumetric weight for products without configured dimensions.

= 1.0.0 =
* First public release.
* Live rate comparison from UPS, DHL, FedEx, GLS, BRT in checkout.
* Automatic shipment creation when order moves to processing.
* Tracking number added to customer emails.
* PDF labels downloadable from the order panel.
* Configurable markup and free shipping threshold.

== Upgrade Notice ==

= 1.4.0 =
Adds resale pricing (percentage, fixed, or your own prices) and a cost→customer-price calculator in the plugin settings.

= 1.3.0 =
Adds a guided onboarding on activation: sign in or register on ProntoSpedire.it and connect your API key in a few clicks.

= 1.2.0 =
Recommended update: adds a prepaid wallet with automatic top-up (SEPA/card) so shipments are paid from your credit without per-order checkout.

= 1.1.0 =
Recommended update: adds UPS Access Points, automatic extra-EU customs invoice, and improved compatibility with the latest WooCommerce.

= 1.0.0 =
First stable release. Compatible with WooCommerce 7.0+.

== Privacy ==

The plugin sends to ProntoSpedire.it the data needed to compute rates (origin and destination ZIP, weight, dimensions) and to create shipments (recipient name, address, phone). No data is shared with third parties beyond the courier chosen for each shipment. See the [ProntoSpedire.it Privacy Policy](https://www.prontospedire.it/privacy).
