=== CourierAPP Connect ===
Contributors: courierapp
Tags: woocommerce, shipping, shipping-labels, tracking, courier
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Requires Plugins: woocommerce
Stable tag: 0.4.30
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce to CourierAPP for shipping quotes, parcel labels, tracking and order updates using eligible carrier services.

== Description ==

CourierAPP Connect integrates a WooCommerce store with the CourierAPP hosted shipping service. A CourierAPP account and a store-specific connection are required. Installing this plugin does not buy a subscription, change your existing shipping zones, or enable live shipment purchases automatically.

The plugin supports:

* Shipping quotes at checkout, using verified package dimensions and weights.
* Label creation after an eligible paid order, or explicitly enabled cash-on-delivery orders with a supported carrier contract.
* Individual and bulk PDF printing from existing labels, in courier-native size or A4.
* Unified customer tracking at https://track.courierapp.gr with private expiring links.
* Tracking details, shipment status and configurable order-status updates.
* Store subscription and usage information in the WooCommerce administration area.
* A structured email editor with store colours, logo, footer and an optional consent-based offer.
* Optional, unchecked email-offer consent in Classic and Blocks checkout, enabled explicitly by the merchant.
* Access to notification settings and optional prepaid SMS through CourierAPP.
* WooCommerce classic checkout, Cart and Checkout Blocks, and HPOS order storage.

The current service is intended for stores shipping from Greece in EUR. Routes depend on the enabled carrier and service. FedEx destinations are currently limited to the EU. Domestic shipping uses the merchant's own supported courier account and agreed tariff. Test and unverified connections cannot create production shipments. Availability is confirmed during account onboarding.

The plugin is provided without a plugin license fee. CourierAPP is a separate hosted service. Eligible shipping is paid separately, and own-carrier subscription plans are optional paid services. SMS, subscriptions, postage and one-off setup charges are separate. Current service prices and the limited introductory setup offer are shown at [CourierAPP plans](https://app.courierapp.gr/eshops/plans?lang=en). The plugin itself is not a time-limited trial. The Free hosted-service plan includes 10 labels per UTC calendar month with verified own carrier accounts, shared across the account's stores. Unused labels do not roll over. Reprints do not count again; postage and SMS remain separate. There is no automatic paid overage.

== Source code and libraries ==

All plugin PHP, CSS and custom JavaScript is included as editable source in this ZIP. In particular, checkout-editor.js, assets/print-client.js and assets/print-ui.js are unminified source files. They run directly, without a compilation step or a private build service. See SOURCE.txt for file locations and third-party notices.

PDF merging uses pdf-lib 1.17.1 (MIT): both assets/pdf-lib-1.17.1.source.js (editable upstream source) and assets/pdf-lib-1.17.1.min.js are included, with assets/pdf-lib-LICENSE.txt. Upstream source and build instructions: https://github.com/Hopding/pdf-lib/tree/v1.17.1 . No remote JavaScript or CSS is loaded.

== External services ==

= CourierAPP hosted service =

This plugin requires a CourierAPP account. The external service is operated by Stylianos Gerantidis and performs carrier quotes, shipment requests, label storage, tracking, notifications and optional catalogue assistance. Connecting the store is an explicit administrator action. Installing or activating an unconnected plugin does not transmit its orders or catalogue.

API host: https://swdjgtbhifglgnnmwthf.supabase.co/functions/v1/ . The plugin uses the merchant-api (live), merchant-api-sandbox, merchant-integrations, merchant-sms and merchant-assistant endpoints. The administrator can also supply their CourierAPP endpoint through server configuration. Accounts and settings open on courierapp.gr and app.courierapp.gr; private customer tracking opens on track.courierapp.gr.

Data and triggers:

* When an administrator starts store connection: store name, site URL and a one-time verification challenge. After approval, authenticated API requests use the store-specific token stored on the WordPress server; it is not exposed to checkout JavaScript.
* On checkout recalculation with the configured service enabled: sender/destination country, city and postcode, cart value, product quantities and parcel weight/dimensions. Automatic packing also sends bounded product names and packing constraints. A quote does not purchase a label or book a pickup.
* On explicitly enabled eligible order fulfilment: order reference, payment/shipping choices, sender and recipient names, email, telephone, addresses, parcel contents, quantities, dimensions, weight and declared value. CourierAPP forwards required shipment data to the selected, configured carrier. Only supported routes and verified contracts are used.
* When an administrator opens a connected service screen or requests diagnostics: the store identifier and token, subscription/usage state, carrier integration and shipment references. Fixture diagnostics use local synthetic responses; fixture.invalid is not contacted. A separately requested live-rate diagnostic calls CourierAPP for a quote only.
* Scheduled processing uses the existing connection for configured shipment/tracking work. Shipment updates and transactional email/SMS use the required order/contact data only when the merchant has enabled those workflows. SMS and postage are separately charged services; the plugin never purchases overages automatically.
* If the merchant explicitly enables the optional email-offer checkbox: customer email, order reference and the checked/unchecked consent state are sent to CourierAPP. Offers require affirmative consent and include an unsubscribe route. This is separate from necessary shipment updates.
* When an eligible merchant enables paid catalogue preparation: product IDs, names, bounded descriptions, existing weight/dimensions, manufacturer/model/SKU identifiers and merchant-supplied source URLs are sent to CourierAPP. Scheduled batches continue only while enabled and within the account limits. Customer names, addresses, orders and payment data are not part of catalogue AI requests. The merchant must approve each individual or bulk proposal before product measurements are changed.

CourierAPP service terms: https://courierapp.gr/terms/
CourierAPP privacy policy: https://courierapp.gr/privacy-policy/
Data processing agreement and subprocessor information: https://app.courierapp.gr/legal/connect-dpa-2026-10-15.html

= Supabase hosting and document storage =

CourierAPP uses Supabase for its API hosting and document storage. Authenticated plugin requests described above reach the Supabase-hosted CourierAPP API. When an authorised user requests an existing label, a short-lived signed storage URL may be used to fetch its PDF; the storage service receives that request, IP address and URL token. The PDF contains the shipment details required for the label. A signed document URL is not a public catalogue or an executable script. No Supabase account or key is requested from the merchant.

Supabase terms: https://supabase.com/terms
Supabase privacy policy: https://supabase.com/privacy

= Optional OpenAI catalogue assistance through CourierAPP =

Only after the merchant enables eligible paid catalogue assistance, CourierAPP may send bounded product titles, descriptions, identifiers and existing kg/cm fields to OpenAI to propose missing measurements. This is a server-to-server operation; no OpenAI key is installed in this plugin and no customer/order/contact data is included. Manufacturer-source lookup may request public product documentation from the manufacturer/source site; those sites receive the document URL request and the service's network address, not customer details. Source evidence and AI estimates are distinguished in the review screen. AI is not called during checkout. Estimates are not measured specifications and need merchant approval before saving.

OpenAI business terms: https://openai.com/policies/business-terms/
OpenAI privacy policy: https://openai.com/policies/privacy-policy/

No analytics or advertising SDK is included. Carrier artwork is not bundled; merchants may select lawful images from their own Media Library. The optional CourierAPP credit/logo in the store's cart and checkout is off by default and can be enabled or disabled independently of the service. Hosted CourierAPP tracking and administration retain the service's branding.

== Installation ==

1. Install and activate WooCommerce, then install CourierAPP Connect.
2. Open WooCommerce > CourierAPP Connect and request a connection. Approve the store in your CourierAPP account, then finish the connection in WordPress.
3. Add CourierAPP to the appropriate WooCommerce shipping zone. Enter real sender details, verified package dimensions, weights and packing limits.
4. Verify the account's mode, supported services and terms. Use sandbox diagnostics before enabling live checkout.
5. Enable public checkout explicitly only when the live account and shipping configuration are verified.

== Frequently Asked Questions ==

= Is a CourierAPP account required? =

Yes. The hosted service performs carrier quotes, shipment creation and tracking. This plugin cannot provide those functions offline.

= Does installation place an order or book a pickup? =

No. A new installation defaults to administrator-only pilot visibility. Live checkout and shipment automation require explicit configuration and an eligible live account. Sandbox and fixture tests do not create real carrier pickups.

= Are all carriers available immediately? =

No. A carrier must support the requested route and the merchant's account must be verified. Domestic services use the merchant's own agreement. Displaying a carrier name is not confirmation of production access or endorsement by that carrier.

= Does uninstalling delete customer orders or cancel shipments? =

No. Order history is retained and existing carrier bookings are not cancelled. Disconnect and revoke the store key in CourierAPP if the connection is no longer needed. Removing the plugin clears its local connection and temporary operational caches; separately retained service records follow the service agreement and privacy policy.

= Where can I get support? =

Use [CourierAPP support](https://courierapp.gr/contact/?source=courierapp-connect) and include the plugin version and a redacted diagnostic summary. Never send passwords, API keys, authentication codes or customer details in a public support topic.

== Changelog ==

= 0.4.30 =
* Use the full CourierAPP namespace for plugin declarations, registrations and new storage, with compatibility for existing connections, orders and catalogue queues.
* Include editable unminified JavaScript and third-party source/license documentation.
* Expand external-service disclosures and make storefront credit an explicit optional setting.

= 0.4.29 =
* One-action regional setup adds or enables CourierAPP across existing shipping zones, including postcode zones and fallback, preserving other methods and markup.
* Reuse actual CourierAPP address/parcel quotes; keep separate Greek contract verification and automatic-shipment customs checks.
* Transactional configuration, administrator nonce/capability checks and unchanged pilot/public-checkout visibility.

= 0.4.28 =
* Consolidate compact 3D packing, carrier logos and cart-only suggestions with paid catalogue preparation.
* Share source-first proposals, monthly product queues and explicit merchant approval across WooCommerce, Shopify and the custom API.
* Preserve known measurements and retain manufacturer-source or AI-estimate evidence; AI never runs during checkout.


= 0.4.22 =
* Shared Free plan: 10 verified own-carrier labels per calendar month; no automatic overage.
* Structured branded email editor, consent-based offers and unsubscribe.
* Optional unchecked email-offer consent for Classic and Blocks checkout.
* Clear zero-cost delivery labels and versioned checkout assets.


= 0.4.21 =
* Opt-in automatic 3D packing using merchant box stock and product dimensions.
* Shared server pricing with per-carrier markup and independent GR/EU/non-EU free-shipping tiers.
* Keep merchant postage and customer checkout prices separate; fail closed on missing measurements.


= 0.4.20 =
* Print existing labels individually or in a merged PDF from classic and HPOS orders.
* Show private, expiring unified tracking links at track.courierapp.gr.


= 0.4.18 =
* Synchronize all nine carrier cards, including ELTA Courier, with account-based setup and shared download metadata.


= 0.4.17 =

* Prepared the plugin for directory review with service documentation and privacy-policy guidance.
* Added uninstall cleanup for the local connection and temporary caches while retaining order records.
* Corrected version display and packaged the local CourierAPP brand asset.
* Omitted third-party carrier artwork from the directory package pending redistribution rights verification.

== Upgrade Notice ==

= 0.4.30 =

Review preparation and storage namespace upgrade. Existing orders, connections and service entitlements are retained. Storefront credit now requires explicit opt-in.

== Optional paid catalogue AI ==
After explicit merchant activation, the server prepares GPT-5.6 Luna measurement estimates through the CourierAPP hosted service and the existing store-scoped key. OpenAI receives bounded product titles, descriptions and kg/cm fields, never customer data. No OpenAI key is installed in this plugin. Estimates are not measured or manufacturer-verified specifications. Individual/bulk merchant approval is mandatory before native WooCommerce fields are saved.

Monthly unique-product allowances: Connect 300: 100; Connect 1000: 300; Business 2000: 600; Scale 5000: 1200; Pro 10000: 2400. Separate daily AI-call caps: 20/50/100/150/250. Other AI actions share request limits. The persistent queue skips complete or unchanged processed products and continues at the next unresolved batch after renewal; it does not restart the catalogue each month. Failures and abstentions are shown separately from accepted corrections. WordPress scheduled tasks depend on site traffic or a configured system cron. No automatic overage purchases.

OpenAI terms: https://openai.com/policies/services-agreement/
OpenAI privacy: https://openai.com/policies/privacy-policy/
