=== Post Hub Delivery ===
Contributors: posthub
Tags: woocommerce, shipping, pickup, inpost, orlen
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Select an InPost or ORLEN pickup point in WooCommerce and import the saved order into a connected Post Hub account.

== Description ==

* Native WooCommerce shipping-zone methods: Post Hub — InPost Paczkomat and Post Hub — ORLEN Paczka.
* Classic Checkout and Checkout Blocks pickup selector, with a real Post Hub map.
* Server-validated point ID, carrier, shipping method and session. Changing carrier or postcode invalidates a previous selection.
* Six pickup fields saved through WooCommerce order APIs (HPOS compatible), visible in the order and order email.
* Polish, English, Ukrainian and Russian customer picker text.

This release supports Poland, PLN and one shipping package. DHL, split shipments, label purchase, courier collection, tracking updates, automatic WooCommerce webhooks and returns are not included. Package size and shipment purchase are reviewed separately in Post Hub. This plugin does not replace a merchant's carrier contract or shipping rates.

Post Hub account and separately approved HTTPS store hostname are required for order import. Create WooCommerce read-only REST API keys for your merchant account and enter them only in Post Hub's integration dashboard. The plugin never requests or stores those keys. There is no automatic updater in this direct-download release; install replacement ZIPs through WordPress when released.

== External services and privacy ==

The public pickup service is opt-in for each shipping method (disabled by default). Once enabled, customers can explicitly open https://post-hub.com/pickup-map in a modal. The map URL includes carrier, interface language and the store origin; the map's network provider sees normal connection metadata such as IP address. The map uses OpenStreetMap tiles and public carrier location data.

When a point is selected the plugin validates its ID server-to-server with https://eountskoyqxtxyupfwhl.supabase.co/functions/v1/business-points using only carrier and point ID. No customer name, email, phone, street address, order or payment details are sent by these picker requests. The selected public point is stored in the existing WooCommerce session and order. Only a merchant's separate authenticated order import transfers normal order information to Post Hub.

Service terms: https://post-hub.com/terms
Privacy policy: https://post-hub.com/privacy
OpenStreetMap privacy: https://osmfoundation.org/wiki/Privacy_Policy

== Installation ==

1. Install and activate WooCommerce. Use an HTTPS storefront, PLN and a Polish shipping zone.
2. In WordPress open Plugins > Add New > Upload Plugin. Upload posthub-woocommerce-1.0.1.zip and activate Post Hub Delivery.
3. Open WooCommerce > Settings > Shipping > Shipping zones. Add Post Hub — InPost Paczkomat and/or Post Hub — ORLEN Paczka to the appropriate Poland zone.
4. Open each method's settings, enable the public pickup service and enter your own shipping price. A blank price keeps the method unavailable. Enter 0 explicitly for free shipping. Include the service in your privacy notice.
5. Classic Checkout and the standard WooCommerce Checkout Block display the picker automatically when one of these native methods is selected. No theme code or manually inserted checkout block is needed.
6. Place a fictional test order on a test copy first. Confirm that missing pickup points block checkout, carrier/address changes clear old points and the six Post Hub fields appear in the saved order.
7. Sign in at https://post-hub.com/dashboard/integrations, request approval of this exact HTTPS hostname, then connect WooCommerce with read-only REST API keys. Use Sync/import in Post Hub to retrieve eligible processing/on-hold orders. Review package details before creating a shipment.

== Frequently Asked Questions ==

= Is this listed or approved on WordPress.org? =
No. This is an installable direct-download release. WordPress.org submission and review are separate.

= Does Checkout Blocks need a paid plan? =
No Shopify plan or Google Maps key is needed. It uses WooCommerce's documented ExperimentalOrderShippingPackages SlotFill and Store API extension callback. The SlotFill is experimental upstream; test compatibility before WooCommerce upgrades.

= Can I import another plugin's InPost metadata? =
Not automatically. Post Hub recognizes this plugin's exact native method IDs and complete six-field contract. Unrecognized, duplicate or mismatched metadata requires manual delivery review.

= Why does checkout ask me to choose again? =
The saved point is tied to the current shipping method and Polish postcode/city. A different carrier or area requires a new selection. Multiple shipping packages are intentionally blocked for these methods.

== Changelog ==

= 1.0.1 =
Escape translated exception messages, keep AJAX JSON errors as plain text, sanitize the area input before exact server-context validation, and add the WordPress.org contributor metadata.

= 1.0.0 =
Initial direct-download release: Classic/Blocks pickup selection, session-bound server validation, HPOS order metadata and Post Hub import contract.
