=== Shipit24 for WooCommerce ===
Contributors: shipit24
Tags: shipping, woocommerce, parcel, locker, courier
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.1.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Integrate ShipIt24 shipping services with your WooCommerce store — parcel lockers and courier delivery at checkout.

== Description ==

**Shipit24 for WooCommerce** connects your WooCommerce store to the [ShipIt24](https://shipit24.eu) shipping platform, enabling customers to select from parcel lockers and courier delivery options during checkout.

= Features =

* Display parcel locker and courier shipping options at WooCommerce checkout
* Interactive locker search and selection widget
* Automatic shipping order creation when a WooCommerce order is marked as "Processing"
* Admin delivery list with real-time status tracking
* PDF shipping label generation from the WooCommerce order screen and admin delivery list
* Automatic delivery status sync via scheduled background job (hourly)
* Support for both the classic WooCommerce checkout and the block-based checkout
* Translations: English (default), Estonian (et), Latvian (lv), Lithuanian (lt)

= How It Works =

1. Configure the plugin with your ShipIt24 API key in **WooCommerce → Settings → Shipping → ShipIt24**.
2. Customers see available locker and courier options when ShipIt24 shipping is selected at checkout.
3. When an order reaches "Processing" status, a shipping order is automatically created via the ShipIt24 API.
4. Track all ShipIt24 deliveries under **ShipIt24 Deliveries** in the WordPress admin menu.
5. Generate PDF labels and view delivery details from the admin delivery list or the individual WooCommerce order screen.

= Third-Party Service: ShipIt24 API =

This plugin connects to the ShipIt24 API (api.shipit24.eu). This external service is used to:

* Retrieve available shipping rates and locker locations (during checkout)
* Create shipping orders (when a WooCommerce order is placed)
* Fetch delivery status updates (hourly background sync)

Data sent to the ShipIt24 API includes: store address and country, customer delivery address, parcel dimensions and weight, and order details (order ID, recipient name, phone number, and email address).

An active ShipIt24 business account and API key are required. Use of the ShipIt24 service is subject to:

* [ShipIt24 Terms of Service](https://shipit24.eu/en/woo-plugin-terms)
* [ShipIt24 Privacy Policy](https://shipit24.eu/en/privacy-policy)

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install directly through **Plugins → Add New** in the WordPress admin.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **WooCommerce → Settings → Shipping** and add a new shipping zone (or edit an existing one).
4. Click **Add shipping method**, select **ShipIt24**, and save.
5. Click **Edit** on the ShipIt24 shipping method and enter your API key, store address, and sender contact details.

== Frequently Asked Questions ==

= Do I need a ShipIt24 account? =

Yes. You need an active ShipIt24 business account and an API key. Contact [ShipIt24](https://shipit24.eu) to get started.

= Which countries are supported? =

ShipIt24 currently supports Estonia, Latvia, and Lithuania. Available shipping options depend on your ShipIt24 account configuration and the destination country.

= Does the plugin support the WooCommerce block checkout? =

Yes. The plugin supports both the classic WooCommerce checkout and the block-based checkout introduced in WooCommerce 8.x.

= Why is a phone number required at checkout? =

ShipIt24 requires the recipient's phone number to send parcel notifications and locker access codes.

= Where can I find the shipping label? =

Once a shipping order is created, a **Generate PDF Label** button appears on the WooCommerce order screen and on the ShipIt24 delivery list page (**ShipIt24 Deliveries** in the admin menu).

= What happens if the shipping order creation fails? =

The WooCommerce order is moved to "On Hold" status and a note is added explaining the failure. You can retry order creation manually from the ShipIt24 delivery list or the WooCommerce order screen.

== Screenshots ==

1. Locker selection widget at WooCommerce checkout
2. ShipIt24 shipping method settings page
3. Admin delivery list with status tracking
4. PDF label button on the WooCommerce order screen

== Changelog ==

= 1.1.0 =
* Added support for WooCommerce block-based checkout
* Added delivery status sync via hourly background cron job
* Added admin delivery list page with sortable, searchable table
* Improved locker search with live API lookup
* Added PDF label generation from the order screen and delivery list
* Centralized ShipIt24 order detection logic
* Improved error handling and manual retry mechanism for failed shipping orders
* Added HPOS (High-Performance Order Storage) compatibility declaration

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.1.0 =
Adds block checkout support and a new admin delivery management interface. No breaking changes from 1.0.0.
