=== Express One Shipment ===
Contributors: exosi
Tags: shipping, woocommerce, delivery, courier, pickup points
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

WooCommerce integration with Express One Pickup Point and Home Delivery shipping services.

== Description ==

This plugin integrates **Express One** shipping services into **WooCommerce**, providing:

- Pickup Point map integration (Parcel Shops & Lockers)
- Home Delivery shipment calculation
- Real-time validation of delivery availability
- Automatic creation/update of shipments in Express One system
- Printing of shipping labels
- Tracking link generation inside WooCommerce orders
- Multi-label bulk printing
- Separate configuration for Pickup and Home Delivery shipping methods

This plugin requires a valid Express One API Key, provided by Express One.

=== Features ===

✔ Pickup Point Map (Leaflet-based)  
✔ Marker-based Locker/ParcelShop selection  
✔ Automatic checkout address autofill  
✔ API validation for ZIP/City delivery availability  
✔ Create, update, and manage shipments from WP Admin  
✔ Print PDF shipping labels  
✔ COD (Cash on Delivery) support  
✔ Bulk label printing  
✔ Full WooCommerce integration  
✔ Admin settings panels for both shipment types  

---

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/express-one-shipment/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **Express One → Main Settings**
4. Enter your **API Key** and Sender Information
5. Configure shipping zones:
   - **WooCommerce → Settings → Shipping → Pickup Shipment**
   - **WooCommerce → Settings → Shipping → Home Delivery Shipment**
6. Save settings

Pickup Map will automatically appear on checkout when the Pickup Shipment method is selected.

---

== Frequently Asked Questions ==

= Do I need an Express One API key? =
Yes. You must obtain your API key from Express One. Without it, the plugin cannot operate.

= Does the plugin send customer data to Express One? =
Only when creating or updating a shipment, or validating a delivery address.  
This data is required to generate shipping labels and provide courier delivery.

= Does the plugin work outside Slovenia (SI)? =
Pickup points are currently available in supported regions only, depending on Express One API availability.

= Does the plugin modify checkout fields? =
The plugin fills in the chosen pickup point address automatically.

= Are there any front-end scripts loaded globally? =
No — Leaflet and map scripts load only on WooCommerce Checkout.

---

== Screenshots ==

1. Pickup Point Map inside checkout
2. Admin settings for Pickup Shipment
3. Admin settings for Home Delivery Shipment
4. Shipment controls inside WooCommerce Order
5. Bulk label printing panel

---

== Privacy ==

This plugin sends customer and order data to **Express One API** when creating or updating a shipment.  
This includes:

- Customer name  
- Delivery address  
- Phone number  
- Email  
- Order details  
- Package weight and contents  

This data is required for postal delivery and is processed on the Express One logistics platform.

No data is transmitted to any service other than **https://api.expressone.si/**.  
No analytics, telemetry, or tracking is performed by this plugin.

Official Express One Privacy Policies:

**Slovenian (SI):**  
https://expressone.si/si/informacije/politika-zasebnosti-4

**English (EN):**  
https://expressone.si/en/info/privacy-policy-4

By using this plugin, store owners are responsible for ensuring GDPR compliance for their shop and informing customers about the use of Express One as a shipping carrier.

---

== External API Disclosure ==

This plugin communicates with the following external service:

**Service:** Express One API  
**Base URL:** https://api.expressone.si/

**Used For:**
- Fetching pickup point locations  
- Validating delivery availability  
- Creating shipments  
- Updating shipments  
- Retrieving PDF shipping labels  

No other external services are contacted.

---

== Changelog ==

= 1.0.1 =
* Added Pickup Shipment method
* Added Home Delivery Shipment method
* Added checkout map integration
* Added shipment creation and label printing
* Added admin settings pages
* Added bulk label printing

= 1.0.2 =
* Added HPOS (High-Performance Order Storage) compatibility
* Added collie count modal — admins can now specify the number of collies when creating or updating a shipment
* Added express_one_build_collies() helper for round-robin item distribution across collies
* Fixed admin notices on HPOS order edit screens
* Fixed error redirect to use transients instead of query string parameters
* Fixed bulk label handler to use order CRUD for HPOS compatibility
* Updated "Create Express One" button label to "Create Express One Shipment"

= 1.0.3 =
* Fixed Parcel Shops error dialog fixed for different page builders

= 1.0.4 =
* Added - Approximate Location Check Added
* Fixed - Location Availability Removed in Parcel Shop Location Selection

---

== Upgrade Notice ==

= 1.0.1 =
Initial release.

= 1.0.2 =
This update adds WooCommerce HPOS compatibility and a new collie count selector on the order edit screen. Upgrade recommended for all stores using WooCommerce 7.1+.

= 1.0.3 =
Parcel Shops error dialog fixed for different page builders

= 1.0.4 =
Location Check Issue

---

== Notes ==
This plugin is not an official WordPress.org or WooCommerce plugin.  
Express One owns all rights to its API service.
