=== Teleship Global Shipping ===
Contributors: teleship
Tags: shipping, woocommerce, ecommerce, fulfillment
Requires Plugins: woocommerce
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
WC requires at least: 9.5
WC tested up to: 9.7
Stable tag: 1.0.16
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

International Duty/Tax Calculator at Check-Out + Speedy & Effortless International Shipping.

== Description ==

Teleship® makes international shipping effortless for merchants on WooCommerce and WordPress. Collect import duties and taxes in your checkout and send orders to 35 international destinations: Europe (EU27), the United States, Australia, Canada, New Zealand, Singapore, Hong Kong, Saudi Arabia and the United Arab Emirates. All duty paid and fully tracked. Drop-off your parcels at the Post Office, Teleship takes care of the rest.

Copyright (c) 2025 Teleship Limited. All rights reserved.

= Features =
* Duty/Tax Collection: Collect import duties and taxes in your checkout from international customers.
* Auto-generate Docs: HS codes and invoices created automatically from your order.
* Buy Labels in One Click: No extra tools needed.
* Track Every Shipment: Real-time tracking for you and your customers.
* Deliver Faster: Choose between standard and expedited delivery.

= Requirements =
* WordPress 6.0 or higher
* WooCommerce 6.0 or higher
* PHP 7.4 or higher
* A Teleship account (free to sign up)

= Pricing and Terms =
* Free to install
* Pay-per-Parcel: Enjoy exceptional shipping rates. No subscription, no surcharges (subject to T&Cs).
* By using this plugin, you agree to Teleship's [Terms of Service](https://teleship.com/terms) and [Privacy Policy](https://teleship.com/privacy)

= Data Sharing =
This plugin shares the following data with Teleship's servers:
* Your store URL and domain
* WordPress user ID (for authentication)
* Order information (when processing shipments)
* Product details (for customs forms and accurate rate calculation)

== Installation ==

* Download the Teleship Global Shipping plugin on Wordpress Plugin Marketplace
* Configure Settings in 5 simple steps (<5 minutes)
* Capture duty/tax from your international customers and start shipping internationally in minutes.


== Frequently Asked Questions ==

= Do I need a Teleship account? =
Yes, you need a Teleship account to use this plugin. You'll be asked to create one when you download the plugin.

= Is this plugin free to use? =
The plugin itself and the tax engine are free, but Teleship services are a pay-per-parcel model with exceptional shipping rates. See [Teleship Pricing](https://teleship.com/pricing) for details.

= How does the integration work? =
This plugin creates a secure connection between your WooCommerce store and Teleship's platform. The Teleship interface is embedded within your WordPress admin dashboard through a secure iframe.

= What data is shared with Teleship? =
The plugin shares your store URL, domain, user ID, and order information with Teleship to enable the shipping functionality. See our Data Sharing section for more details.

= I'm getting CloudFlare errors - what should I do? =
If you're using CloudFlare and experiencing issues with shipping rates or plugin functionality, you may need to whitelist Teleship in your CloudFlare settings:

1. **Access CloudFlare Dashboard**: Log in to your CloudFlare account and select your website domain
2. **Go to Security Settings**: Navigate to "Security" → "WAF"
3. **Create Firewall Rule**: Add a new rule with these settings:
   - Rule Name: "Allow Teleship Plugin"
   - Field: "User Agent"
   - Operator: "contains"
   - Value: "Teleship-WooCommerce-Plugin"
   - Action: "Allow"

Alternatively, you can create an IP-based rule or contact Teleship support at support@teleship.com for assistance.

== Screenshots ==

1. Expand Globally, Ship Effortlessly with Teleship®
2. As simple as domestic shipping.
3. Collect Duties and Taxes from your International Customers.
4. Purchase labels and generate customs documents in one clicks.
5. Retrieve labels and Commercial Invoices from Teleship® app.
6. End-to-end tracking of your international shipments.

== Changelog ==

= 1.0.16 =
* Fixed: Fulfillment state resets when shipment is cancelled in Teleship (order reverts to processing)
* Fixed: Stale fulfillment data cleared when previously-fulfilled order reverts to processing
* Added: Product sync now includes store weight unit in metadata
* Added: Order line items enriched with product weight from metadata for accurate bulk purchase rates

= 1.0.15 =
* Fixed: Order sync now filters by supported destination countries (35-country whitelist) preventing unsupported orders from syncing
* Fixed: Product classify uses search-first UUID resolution — faster lookups, upsert only for new products
* Added: Sync suspension mechanism prevents redundant bulk syncs during REST API product saves
* Added: Product classification complete webhook event handling
* Improved: Product sync payloads now include weight and default package metadata
* Improved: HTTP client supports per-request max_retries override for granular retry control
* Improved: Classify timeout increased to 90s to match backend processing time

= 1.0.14 =
* Fixed: Checkout rate requests now use tax-exclusive prices for accurate duty/tax calculation
* Fixed: Order sync handles stale UUIDs gracefully (404 on PUT falls back to POST)
* Fixed: Bulk order sync performance improved with upfront normalization and forced POST upserts
* Fixed: Debug logging simplified to use standard error_log gated by WP_DEBUG
* Added: Order payloads now include integrationId for proper integration association
* Added: Debug endpoint for viewing order sync mapping table (/debug/order-mappings)
* Improved: HTTP client skips retries on 4xx client errors (except 429) for faster failure
* Improved: HTTP client supports fire-and-forget (non-blocking) requests
* Improved: WordPress Plugin Check compliance with phpcs:ignore annotations

= 1.0.13 =
* Fixed: Checkout rate title now correctly displays "Duties prepaid" using meta_data service name
* Fixed: Origin country HS code extracted from classification regionalCodes for accurate product data
* Improved: Product sync payloads now include restrictions and contentHash fields

= 1.0.12 =
* Added: Product image URLs now displayed on the Products page
* Added: Classification now covers all 14 supported destination regions (GB, EU, US, CA, AU, NZ, NO, CH, SG, HK, AE, SA, IS, LI)
* Improved: Product updates return instantly — Teleship sync runs in background
* Improved: Sync payloads now include product image URLs

= 1.0.11 =
* Added: OAuth authentication with secure credential storage
* Added: Automatic webhook registration with Teleship
* Added: Order synchronization to Teleship platform
* Added: Product synchronization with REST API and portal bearer token auth
* Added: Connect/Disconnect UI in admin settings
* Added: Bearer token auto-refresh before expiration
* Added: Embedded portal settings in admin iframe
* Improved: Product sync now uses OAuth authentication with paginated batch sync
* Improved: Unified HTTP client usage across all API calls
* Improved: Webhook receiver uses centralized secret management
* Improved: Unified plugin environment config and order status handling
* Fixed: Deactivation cleanup for OAuth credentials and webhooks
* Fixed: REST API product sync endpoint compatibility
* Fixed: Integration classification errors, order filtering, and embedded account scoping

= 1.0.10 =
* Added: Fulfillment webhook endpoint for automated order completion
* Added: WooCommerce email hook support - tracking info now displays in completed order emails
* Added: Tracking information display in customer My Account order view
* Improved: Tracking data is saved before status update to ensure emails include tracking info

= 1.0.9 =
* Updated: Expanded international shipping coverage to 35 destinations
* Updated: Now shipping to Europe (EU27), United States, Australia, Canada, New Zealand, Singapore, Hong Kong, Saudi Arabia and UAE
* Improved: Updated plugin description and features documentation

= 1.0.8 =
* Fixed: License header now uses SPDX-compatible format (GPL-2.0-or-later)
* Fixed: Security improvement - removed unused nonce verification code
* Improved: WooCommerce Marketplace validation compliance

= 1.0.7 =
* Fixed: WordPress 6.9 compatibility - replaced rand() with wp_rand()
* Fixed: Added missing translators comments for internationalization
* Fixed: Proper output escaping for all admin notices
* Fixed: Ordered placeholders in translatable strings
* Updated: Tested up to WordPress 6.9

= 1.0.6 =
* Renamed: navigation page "Orders" to "International Orders"
* Renamed: navigation page "HS Classifier" to "Products"

= 1.0.5 =
* Added: CloudFlare-friendly HTTP client with intelligent request fingerprinting
* Improved: Better request patterns to avoid triggering security systems

= 1.0.4 =
* Improved: Enhanced API authentication system with intelligent fallback mechanisms
* Improved: Better compatibility with various WooCommerce server configurations
* Fixed: Resolved uninstallation failures for stores requiring OAuth authentication
* Fixed: More reliable webhook cleanup during plugin uninstallation
* Added: Intelligent authentication method learning and preference storage
* Added: Smart authentication retry logic for better API reliability

= 1.0.3 =
* Added: price breakdown description to shipping method rate label
* Updated: filter out draft orders from fulfillable orders in Teleship

= 1.0.2 =
* Added: Teleship HS classifier

= 1.0.1 =
* Added: Live rate shipping capabilities using Teleship API
* Added: Shipping zones support for Teleship shipping rates
* Added: Global and per-zone settings for fallback rates
* Added: Debug mode for troubleshooting API connections
* Added: Account ID storage during authentication flow
* Added: Handling fees for shipping rates
* Improved: Better error handling and logging

= 1.0.0 =
* Initial release
