=== Wtyczkownia - Shipping for InPost ===
Contributors: wtyczkownia
Tags: inpost, paczkomaty, kurier, woocommerce, shipping
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Independent shipping plugin for InPost in WooCommerce: parcel locker picker and InPost courier. Block and classic checkout, no token needed.

== Description ==

**Independent plugin, not an official InPost product.** Wtyczkownia - Shipping for InPost is developed and supported by Wtyczkownia ([wtyczkownia.pl](https://wtyczkownia.pl/)). It is not affiliated with, endorsed or sponsored by InPost S.A. InPost, Paczkomat and PaczkoPunkt are trademarks of InPost S.A. and are used here only to describe compatibility with InPost services. For support, contact Wtyczkownia, not InPost.

Shipping for InPost in WooCommerce in one small plugin: the **InPost Parcel Locker** method with a fast point picker and the **InPost Courier** method for delivery to the door. Works in the block and classic checkout, with no extra dependencies and no account registration.

**InPost Parcel Locker**

* The customer picks a parcel locker on a map or from a list - in the cart and at checkout, **block** and **classic (shortcode)** versions.
* Search by city, postcode, street or locker code, "use my location", mobile friendly.
* Parcel lockers only, or parcel lockers + PaczkoPunkty.
* Two map engines: the **built-in map** works out of the box with no InPost account or token, or the **official InPost Geowidget** with your token.
* Maximum cart weight (InPost parcel lockers accept up to 25 kg).

**InPost Courier**

* Delivery to the shipping address from the order - the customer does not have to choose anything.
* Its own cost, free shipping threshold and maximum weight.

**For both methods**

* Shipping methods for WooCommerce shipping zones: flat cost, free shipping from a given order value, free shipping coupons.
* Cash on delivery per method: untick "Cash on delivery" in a method and it is hidden when the customer picks a COD payment method.
* One "InPost" box in the order screen with the method, the selected point (which the shop manager can change) and the delivery address.
* Delivery details in customer e-mails, the thank-you page, My Account and the WooCommerce REST API (for Base, Apilo and ERP systems).
* HPOS (High-Performance Order Storage) compatible.

**PRO add-on** (available separately at wtyczkownia.pl): parcel locker and courier shipments with labels from the order screen, bulk label printing, automatic tracking numbers and order statuses, cash on delivery, insurance, Paczka w Weekend and courier pickup.

== External services ==

This plugin connects to the following third-party services when the parcel locker picker is used in the cart or at checkout, and in the admin when you open a point on the map. When the customer opens the picker, the delivery address they entered at checkout (street, postcode, city) is used automatically to centre the map on the nearest points; they can also type another place into the search box. The bundled Leaflet library only draws the map and sends nothing by itself.

* **OpenStreetMap Nominatim** (`nominatim.openstreetmap.org`) - turns that address or the typed text (city, postcode, street) into coordinates. Requested by your server, not by the customer's browser, and cached; no name, e-mail or order data is sent. Not used when the text is a parcel locker code. [Usage policy](https://operations.osmfoundation.org/policies/nominatim/), [privacy policy](https://osmfoundation.org/wiki/Privacy_Policy).
* **InPost points API** (`api-shipx-pl.easypack24.net`) - loads parcel locker locations. Requested by your server with the map coordinates only (the area around the delivery address, the visible map area, or the customer's location if they click "Use my location") or a locker code. No names, e-mails or orders are sent. [InPost terms](https://inpost.pl/regulaminy), [privacy policy](https://inpost.pl/polityka-prywatnosci).
* **OpenStreetMap tiles** (`tile.openstreetmap.org`) - map images loaded directly by the customer's browser, so OpenStreetMap receives the customer's IP address, browser details and which map area is shown (around the delivery address). [Tile usage policy](https://operations.osmfoundation.org/policies/tiles/), [privacy policy](https://osmfoundation.org/wiki/Privacy_Policy).
* **InPost Geowidget** (`geowidget.inpost.pl`) - only when you choose the official Geowidget map and enter a token. It runs in the customer's browser, so InPost receives the customer's IP address and the delivery address used to centre the map. [InPost terms](https://inpost.pl/regulaminy), [privacy policy](https://inpost.pl/polityka-prywatnosci).

Shop owners should mention these services in their privacy policy.

The built-in map relies on InPost's public point data. If InPost restricts this access, the plugin shows a notice in the admin and you can switch to the official Geowidget by entering a token.

InPost, Paczkomat and PaczkoPunkt are trademarks of InPost S.A. This plugin is an independent product of Wtyczkownia: it is not affiliated with, endorsed or sponsored by InPost S.A.

= Third-party libraries =

* **Leaflet 1.9.4** (`assets/vendor/leaflet/`) - BSD 2-Clause licence, compatible with GPL. Unmodified distribution files; human-readable source: https://github.com/Leaflet/Leaflet/tree/v1.9.4

== Installation ==

1. Install and activate the plugin.
2. Go to WooCommerce → Settings → Shipping, open a shipping zone (e.g. Poland) and add "InPost Parcel Locker" and/or "InPost Courier". Set the cost, free shipping threshold and maximum weight.
3. Optional: WooCommerce → Settings → Shipping → InPost Shipping - choose the map engine and paste a Geowidget token.

== Frequently Asked Questions ==

= Do I need an InPost account? =

No. The built-in map works without any account or token. If you have a Manager Paczek account you can use the official Geowidget instead.

= Where do I get a Geowidget token? =

Log in to Manager Paczek → My account → API → Geowidget → Generate, and add your shop domain.

= Does it work with the block checkout? =

Yes - both the Cart & Checkout blocks and the classic shortcode pages are supported.

= Can Base (BaseLinker), Apilo or my ERP read the chosen parcel locker? =

Yes. The point is saved on the shipping line, so the WooCommerce REST API returns it in `shipping_lines[].meta_data`: `delivery_point_id`, `delivery_point_name`, `delivery_point_address`, `delivery_point_postcode`, `delivery_point_city`, plus `_paczkomat_id` and `_parcel_machine_id`.

== Screenshots ==

1. Parcel locker picker in the block checkout: search by city, postcode or locker code, or choose on the map.
2. Built-in map with the nearest parcel lockers, distance and location notes - no InPost account or token needed.
3. The chosen parcel locker shown right in the checkout, with a "Change" button.
4. InPost Courier as a separate shipping method - delivery to the customer's address.
5. The InPost box in the order screen: method, chosen point and changing the point for the customer.
6. Shipping method settings in a WooCommerce zone: name, picker type, cost, free shipping threshold, coupons and maximum weight.
7. Plugin settings: built-in map or the official InPost Geowidget, shown points and cash on delivery.

== Changelog ==

= 1.0.0 =
* First release.
