=== CTT for WooCommerce === Contributors: CTT Tags: shipping, multi carrier, save, automate, woocommerce Requires at least: 4.9 Tested up to: 6.2 Requires PHP: 5.6 Stable tag: 4.0.9 Author URI: https://ctt.pt/ License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html CTT for WooCommerce == Description == == Installation == 1. Download and install the plugin. You can also upload the entire “CTT for Woocommerce” folder to the `/wp-content/plugins/` directory 1. Activate the plugin through the ‘Plugins’ menu in WordPress 1. Go to Settings > CTT Settings and insert your keys to get started. == Changelog == == Changelog == = 4.0.0 - 2025-03-10 = Enhancement – Added support for block-based checkout and theme compatibility with pickup point maps. Enhancement – Increased security with nonce validation and user role verification. Enhancement – Implemented field sanitization and escaping throughout the plugin. Enhancement – Replaced direct SQL with prepared statements for enhanced security. Enhancement – Removed unnecessary input fields from shipping method creation. Fix – Removed unused marker assets from pickup point maps. Fix – Updated frontend geolocation and recompiled assets. Fix – Added translations for all backend and frontend text strings. = 4.0.2 - 2025-05-29 = Fix – Corrected tracking URL display in the Order Details “Custom Fields” section after label creation. Fix – Removed “Label Printing Consent” option from settings and defaulted to consent. Fix – Updated translation strings. Fix – Prevented “Invalid JSON” and “PHP Fatal” errors for specific WooCommerce versions. Enhancement – Improved design of pickup point buttons and checkout map. Enhancement – Enhanced mobile-friendly layout for the checkout map. Enhancement – Mapped product SKU to “Article Number” field. = 4.0.3 - 2025-06-24 = Fix – Resolved PHP compatibility warnings and deprecated `strpos()` usage (PHP 8.1+). Fix – Order status now updates correctly when exported. Fix – Prevented print label action from re-triggering when paginating callback URLs. Enhancement – Updated database schema to include the required `labelurl` column. Enhancement – Added database upgrade routine with improved error handling. Enhancement – Declared all properties explicitly, removing deprecated dynamic properties. Enhancement – Improved JSON parsing with stronger error handling. Enhancement – Secured SQL queries using prepared statements. = 4.0.4 - 2025-10-15 = Fix – Default pickup behavior bug when using Free Shipping. Fix – AJAX error (400 Bad Request) when clearing pickup sessions. Fix – Missing button for mandatory pickup points in Flat Rate carriers. Fix – Removed Service Level option from Weight-Based Shipping. Fix – Pickup session now correctly clears when switching from pickup to non-pickup shipping methods. Enhancement – Added automatic database schema update for Label URL storage to prevent "No Labels to Print" errors. Enhancement – Added loader before the map loads to improve user experience. Enhancement – Made the pickup point map fully responsive across all devices. == 4.0.4 - 2025-10-17 = Fix - Enforce pickup point selection when mandatory Fix - Make Pickup Location Button available for all carriers with pickup capability. == 4.0.5 - 2025-11-21 == Fix - Add compatibility function to make the map display with elementor checkout Fix - Add event listeners that actively monitors and restores the pickup button dissapearing on shipping method change. Fix - Added type validation using `is_object()` and `is_array()` to fix CarrierId Property Assignment Error == 4.0.6 - 2025-12-09 == Fix - Correct the Automatic Export status-saving logic to ensure automatic exports run as expected. Feature - Add support for importing HTS Code and Country of Origin from WooCommerce custom product attributes when available. == 4.0.7 - 2026-01-12 == Fix - Resolved a fatal error when creating labels via Bulk Actions, ensuring bulk label generation works reliably without crashing. Fix - Improved API authentication error handling to prevent generic “Invalid keys” messages and provide clearer, actionable feedback when connection or credential issues occur. == 4.0.8 - 2026-02-11 == Fix — Settings page crash preventing access to the plugin settings Fix — Added custom method to resolve error "Call to undefined method WC_Countries::get_country_alpha3()" that was preventing label printing and order export Enhancement — Added a "Reset Export Status" button in the order actions dropdown that lets merchants reset the status and re-export orders == 4.0.9 - 2026-03-16 == Fix - Carrier ID not being passed to the pickup widget before map open on classic checkout templates causing the PUDO map to fail Fix - Map markers now display correctly with the right size and fallback image Fix - Fatal error on checkout page now resolved Fix - Checkout page no longer freezes after re-selecting a pickup point Fix - Pickup button visibility detection across different checkout types including Classic Fix - Deprecated get_meta() usage causing PHP fatal error on newer WooCommerce versions when visiting cart page Fix - Label printing infinite spinner caused by large PDF payload being sent to the browser