=== City Express Shipment ===
Contributors: nesywoocom
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.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

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

== Description ==

This plugin integrates **City Express** 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 City Express 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 City Express API Key, provided by City Express.

=== 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/city-express-shipment/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **City Express → 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 City Express API key? =
Yes. You must obtain your API key from City Express. Without it, the plugin cannot operate.

= Does the plugin send customer data to City Express? =
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 Croatia (HR)? =
Pickup points are currently available in supported regions only, depending on City Express 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 **City Express 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 City Express logistics platform.

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

Official City Express Privacy Policies:

**Srpski (RS):**  
https://www.cityexpress.rs/poslovna-dokumenta

**English (EN):**  
https://www.cityexpress.rs/en/about-us

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

---

== External services ==

This plugin connects to the City Express API to provide shipping functionality. It is required for all core features: fetching pickup point locations, validating delivery availability, creating/updating shipments, and retrieving shipping labels.

**Service:** City Express API
**Base URL:** https://api.cityexpress.rs/

**Data sent and when:**

- Pickup point locations are fetched (no customer data sent) when the checkout page loads and the Pickup Shipment method is active.
- Customer shipping address (city and ZIP code) is sent to the API when validating delivery availability during checkout.
- Customer name, delivery address, phone number, email, order details, and package weight/contents are sent to the API when a shipment is created or updated from the WooCommerce order admin.
- The API key is included in every request for authentication.

**Tracking links:** Shipment tracking links (displayed in WooCommerce order admin) point to https://inet.cityexpress.rs/ — no data is sent automatically to this domain; it is opened by the admin user manually.

**City Express terms of service:** https://www.cityexpress.rs/poslovna-dokumenta
**City Express privacy policy (SR):** https://www.cityexpress.rs/poslovna-dokumenta
**City Express privacy policy (EN):** https://www.cityexpress.rs/en/about-us

No other external services are contacted by this plugin.

---

== Changelog ==

= 1.0.0 =
* 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

---

== Upgrade Notice ==

= 1.0.0 =
Initial release.

---

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