*** Overseas Express Changelog ***

2025-12-24 - version 1.0.1
* Initial release
* Add - Core functionality for Orders created via WooCommerce are forwarded to Overseas Express, converted into shipments,create barcode, tracking etc.
* Add - WooCommerce compatibility (tested up to WooCommerce 10.3.5)
* Add - Basic settings page with configuration options
* Add - Internationalization (i18n) support
* Dev - Code structured for maintainability and future enhancements

2026-03-26 - version 1.0.2
* Fix - Return Document Shipment Issue Fixed

2026-05-20 - version 1.0.3
* Add - Approximate Location Check Added
* Fix - Location Availability Removed in Parcel Shop Location Selection

2026-06-01 - version 1.0.4
* Add - International shipping eligibility check for Home Delivery: non-HR destinations are now validated against the Overseas Express API before checkout is allowed
* Add - WooCommerce Blocks (Gutenberg) checkout support for country eligibility validation via Store API hook
* Fix - Country eligibility check now works for both classic shortcode checkout and block-based checkout

2026-08-03 - version 1.1.0
* Add - New "Pickup Shipment (Weight-Based)" and "Home Delivery Shipment (Weight-Based)" shipping methods with dynamic, admin-configurable price tiers by parcel weight (e.g. 0-3000g = 2.00, 3000-6000g = 5.00)
* Add - Optional maximum parcel size (sum of length + width + height) limit for the weight-based Pickup method
* Add - Both new methods share the existing pickup-point map selection and Home Delivery courier API eligibility checks with the original rates
* Add - New admin settings pages under Integration Shipment for the weight-based methods

2026-08-10 - version 1.2.0
* Add - Weight tiers on the weight-based Pickup and Home Delivery methods are now grouped per destination country, each with its own dynamic {min, max, price} tier table
* Add - A "Default" country group acts as the fallback for any destination country without an explicit override
* Add - Weight-based methods and their original (default) counterparts are now mutually exclusive: enabling one automatically disables the other, with an admin notice explaining why
* Add - Weight-based methods become unavailable at checkout if any cart item is missing its Weight (or, for Pickup with a size limit set, its Length/Width/Height), unless the cart already qualifies for free shipping
* Add - Admin-only warning notices on the weight-based methods' settings screens reminding store owners to fill in product Weight/Dimensions

2026-08-10 - version 1.2.1
* Fix - Bulk "Print Labels" action on the Orders list no longer silently no-ops when WooCommerce/HPOS passes the selected order IDs under an unexpected request key; the handler now falls back to reading the raw request so the action always runs
* Fix - Bulk "Print Labels" now always shows a result notice: an explicit "No orders were selected" notice if nothing was picked up, instead of doing nothing
* Fix - Label PDF generation failures (label API HTTP errors, non-2xx responses, empty/undecodable label data, failed disk writes) are now surfaced as a clear error notice instead of failing silently
* Fix - Missing API Key / missing Label Layout ID during bulk label creation now show a normal admin notice instead of a dead-end wp_die() screen
* Fix - "cargo" flag set to false when creating a new shipment (overseas_express_handle_create_shipment); the shipment update request (overseas_express_handle_update_shipment) still sends "cargo" as true

2026-08-10 - version 1.3.0
* Dev - Internal refactor only, no functional changes: split the single 3,600+ line plugin file into includes/ (shipping-helpers, pickup-map, order-integration, admin-settings, one file per shipping method class) and includes/traits/
* Dev - Deduplicated postcode matching, country matching, shipping-method registration, and the negative-price cart label, which were previously copy-pasted across all four shipping method classes, into a shared trait
* Dev - Verified byte-for-byte: all API endpoint URLs, nonce action strings, saved option names, and shipping method IDs are unchanged, so existing shipping zone configuration and saved settings keep working without any action needed

2026-09-23 - version 1.3.1
* Fix - Pickup point selection never reached the order: the hidden checkout fields checkout-map.js writes the selected parcel shop into were never rendered, so $_POST['overseas_express_selected_point'] was always empty. Classic checkout therefore rejected every Pickup order with "You must select a pickup point before completing your order", and woocommerce_checkout_create_order returned early without saving the parcel shop address or the "Pickup Point" order meta
* Fix - The selected parcel shop is now saved as the order's shipping address again, so shipments created via the API go to the pickup point instead of the customer's own address
* Add - "Select a pickup point" / "Change pickup point" button rendered on classic checkout (woocommerce_review_order_before_submit) when a Pickup method is chosen; previously the map could only be opened automatically on a shipping method change and could not be reopened once closed
* Add - overseas_express_get_pickup_selection() resolves the selection from POST with a fallback to the session values already stored by the set-pickup AJAX call, so the selection survives checkout fragment refreshes and works on Blocks checkout, which posts no hidden fields
* Add - Blocks (Store API) checkout now requires a pickup point for Pickup methods and writes the parcel shop address plus "Pickup Point" meta onto the order
* Fix - Parcel shop names were HTML-escaped before being written into the hidden inputs, so a name containing "&" was stored on the order as "&amp;"

2026-10-20 - version 1.3.2
* Fix - Shipping price on classic checkout/cart now follows WooCommerce's "Display prices during cart and checkout" tax setting. When prices are shown including VAT, the Overseas Express rate label now shows the VAT-inclusive amount (e.g. 4.00 instead of 3.28) to match WooCommerce Blocks. Order total calculation is unchanged
* Fix - Shipments are now always picked up from a pickup address registered for the customer in NESY. The manually typed "Sender Information" fields were removed from Main Settings; a "NESY Pickup Address" dropdown (loaded from the Overseas Express /senders API) replaces them and its sender ID is sent on shipment create/update. With no address selected, NESY uses the account's default pickup address
* Fix - Classic checkout (seen with the WoodMart theme) rejected Pickup orders with "You must select a pickup point" although a point was selected and shown. Picking a point changed the shipping country field, which started a checkout refresh in parallel with the AJAX call storing the point; the refresh saved its older copy of the session and erased the point, then re-rendered the hidden fields empty. The selection is now kept in the browser and written back into the form after every checkout refresh and right before submit (hidden fields are injected into the form if the theme does not render them), every checkout refresh copies the posted point back into the session, and the point is stored before the address fields are changed
* Add - "Create Integration Shipments" bulk action on the Orders list: creates the shipment for every selected order in one step, so orders no longer have to be opened one by one before bulk printing. Each new shipment gets one collie per order item and the order is marked completed, as with the single-order "Create Integration Shipment" button
* Add - "Create Shipments & Print Labels" bulk action: creates the missing shipments for the selected orders and returns one PDF with the labels of all of them. Orders that already have a shipment are not sent again; their existing label is included. A result notice lists created orders, skipped orders and each failed order with the API error message
* Fix - Bulk actions (including "Print Labels") are now also available on the legacy (non-HPOS) WooCommerce Orders screen
