== Changelog ==
= 2.2.0 =
Added: Optional validation of the selected pickup point using the API.
Added: Extended logging for diagnostics.
Updated: Displaying the name of the pickup point next to its address.
Updated: Added a specific log message for logging claim assistant label printing actions.
Added: Support for external cache folder.
Updated: The minimum required PHP version is now 7.4.
Added: It is now possible to insert custom shortcodes into emails to display information about the selected pickup point or the submitted packet.
Updated: Advanced carrier setting is now enabled by default. Removed notice about pickup point split activation.

= 2.1.2 =
Fixed: Plugin no longer crashes on the orders list when a refunded order is present.

= 2.1.1 =
Fixed: Removing all transients and options upon uninstall.
Updated: Checkout data transient lifetime raised to the default value of WooCommerce.
Added: Backend checkout data validation when using block checkout.

= 2.1 =
Added: New Home page with plugin setup wizard.
Added: Tutorials (setup, order detail, orders list, customs declaration).
Added: Option to force database tables creation/update (do_action('packeta_create_tables')).
Added: New setting option: Hide Packeta logo in widget.
Updated: Plugin uninstall no longer deletes data and settings (removed only if PACKETERY_REMOVE_ALL_DATA=true is defined); a warning is shown on deactivation.
Updated: Bulk printing of carrier labels – for external carriers only their labels can be generated.
Updated: Final shipment statuses (e.g. delivered, canceled) are no longer displayed.
Fixed: Missing widget in order detail for universal shipping zone.

= 2.0.11 =
Fixed: Correct loading of shipping methods in case of premature payment plugin queries.

= 2.0.10 =
Fixed: Introduced carrier and shipping method caching to prevent excessive memory usage and performance problems.

= 2.0.9 =
Fixed: Type error when migrating guest session to user session during order.

= 2.0.8 =
Fixed: Resolved data transfer from the checkout and pairing of the order with the plugin when registering a user in the checkout.

= 2.0.7 =
Updated: Enabled age verification for Home delivery Slovakia.

= 2.0.6 =
Fixed: Checkout no longer fails to render in case no valid tax rates are found.

= 2.0.5 =
Updated: The payment method restriction set for the carrier has been implemented in the block checkout.
Fixed: Packeta information is added to emails even when the order status is changed in administration.

= 2.0.4 =
Fixed: Shipping tax was not displayed in the order details (fixed only for advanced carrier settings).

= 2.0.3 =
Added: Added taxes settings to options export.
Fixed: Resolved error occuring when running in CLI environment.

= 2.0.2 =
Fixed: Fixed wp-cli compatibility issue.
Fixed: In rare cases, translating the plugin into other languages did not work. However, we are not entirely sure that this fix will successfully resolve the issue.
Fixed: The plugin will no longer display an error if $_POST contains invalid values from another plugin.
Fixed: The plugin will no longer display an error if the WP methods delete_transient() or set_transient() return a different return value than the one specified in the PHPDoc.

= 2.0.1 =
Fixed: In certain situations, there was an error when displaying the "Log" page
Fixed: In the order list, there was an error when displaying the date in the "saved to" column for orders to a pickup point if the e-shop uses shipment tracking

= 2.0.0 =
Added: It is now possible to enable advanced shipping settings in the plugin. In the shipping zones, it is then possible to set the shipping method for individual Packeta carriers.
Added: It is now possible to set the maximum dimensions of the shipment for each carrier.
Added: It is now possible to choose in the settings whether the dimensions of the shipment will be entered in mm or cm.
Added: It is now possible to extend the deadline for picking up the shipment for an order.
Added: The product dimensions are passed to the widget for selecting a pickup location. The widget will then only offer pickup locations to which the shipment can be delivered.
Updated: Optimization of the packetery_order table.
Updated: Improvement of block checkout support.
Fixed various bugs.
Improvement of plugin stability.

= 1.8.7 =
Updated: Added compatibility with WordPress 6.7 - premature use of translation function prevented.

= 1.8.6 =
Fixed: In the plugin settings, the default shipment weight was incorrectly stored if it contained a number ending in zero.
Fixed: Failed to save plugin settings if default weight or default dimensions were disabled and hidden settings field contained invalid data.
Fixed: TypeError when getting cart product instance that could appear at checkout.
Updated: Syncing order statuses one by one instead of a single batch.

= 1.8.5 =
Updated: Users now have the option in the Packeta pick-up point carrier settings to choose whether to deliver to Z-Boxes, pick-up points, or both.
Updated: Added more packet statuses.
Fixed: Fixed a bug that caused the plugin to crash when there is an unexpected or invalid packet status in the database.

= 1.8.4 =
Fixed: Incorrect usage of a helper class causing an error when order with stored API error message is in the order list.

= 1.8.3 =
Added: Possibility to enable Tracy debugger for specific IP addresses.
Fixed: Correct display for Packeta Pick-up Point carrier in countries with external pickup points.

= 1.8.2 =
Added: Now the user has the possibility to force which type of checkout he uses (block-based or classic).

= 1.8.1 =
Fixed: Error in bulk label printing.

= 1.8.0 =
Added: [Block-based checkout](https://woocommerce.com/checkout-blocks/) support.
Added: Calculation of the shipping price according to the order value.
Added: Important information about the packet (submission or cancellation of the packet, label printing, creation of a claims assistant) will now be recorded in the internal order note.
Added: Required fields (e.g., packet weight and dimensions when required by the carrier) are now highlighted if missing from the order.
Added: An option to set multiple payment methods as cash on delivery (COD).
Added: Displaying the shipment status in the order detail.
Updated: When changing a carrier, the name created by the user is applied.
Updated: Removed the dependency on Guzzle and used the WordPress native methods instead.
Updated: Removed all mentions of Alzaboxes.

= 1.7.6 =
Updated: When changing the carrier, the name entered by the user is used.

= 1.7.5 =
Fixed: Functioning of the plugin in case of creating a custom order status and setting it in automatic synchronization.

= 1.7.4 =
Fixed: Fixed carrier change when switching delivery country.

= 1.7.3 =
Fixed: Improved compatibility with third party plugins.
Fixed: Checkout payment filter fixed.

= 1.7.2 =
Added: PHP 8.1-8.2 support.
Added: It is possible to set the default packet dimensions in the settings.
Changed: Instead of Guzzle client, we're using WordPress function to fetch feature flags from external API.
Changed: Settings - default weight now accepts up to 3 decimal places.
Fixed: Filtering payment gateways without shipping calculation.

= 1.7.1 =
Fixed: Malfunctioning import of previous version's settings.
Fixed: Warnings and/or missing country codes in country list.

= 1.7.0 =
Added: Option to set shipping prices including VAT.
Fixed: Fix plugin uninstallation for multisite.
Fixed: The plugin does not respect the user's language setting, but only the language in the global setting.
Added: The display of “Free” for the free shipping method in the checkout can be turned off in the settings.
Added: Age verification with CZ Home delivery carrier.
Fixed: Shipping price and currency are not being passed to the Pickup Points widget.
Updated: Improvements to the shipment information form.
Fixed: Not working saving of the customs declaration if the invoice issue date is incorrect.
Added: Displaying the status of the shipment for the order right after the shipment has been created in the administration.
Minor bug fixes.

= 1.6.4 =
Fixed: A user, who was not logged in, could be shown information about a selected pickup point after loading into the checkout, even if the user had not yet selected a pickup point.

= 1.6.3 =
Added: packeta_widget_weight filter
Added: In the case of free shipping, the information "Free" is now displayed after the name of the shipping method.

= 1.6.2 =
Fixed: In some cases (depending on the hosting settings), the value of the shipment or COD for the sent shipment was incorrectly displayed in the API Log.
Fixed: In order emails or on the thank-you page, the header "Packeta" is no longer displayed, if no information about pickup points is available.
Fixed: When sending some types of emails (e.g. forgotten password), an error occurred while sending them.
Update: Parameters passed to the Orders endpoint response were moved from order_meta directly to the shipping method. At the same time, a new parameter “point_name” was added.

= 1.6.1 =
Added: New filters have been added to display information in e-mail. In the plugin settings, it is possible to select the filter that will be used. Emails now show a tracking number with a link to track your shipment online.
Fixed: Treated the situation when a country where we do not have internal delivery points is selected for the order.

= 1.6.0 =
Added: High Performance Order Storage (Custom Order Table) feature support.
Added: Claim assistant support.
Added: Customs declarations support.
Added: REST API support - Packeta specific information added to shop order object.
Added: Selected pickup point or validated address is saved using AJAX, which increases compatibility with non-standard templates and plugins.
Added: Ability to disallow checkout payment methods in carrier settings
Added: Possibility to prepare packet labels on order detail.
Updated: Surname is no longer required to send a shipment to Packeta. If the order does not meet the conditions for sending shipment, specific validation errors are now listed in the Packeta log.
Updated: Periodic tasks for deleting log records and synchronizing shipment states were implemented asynchronously using ActionScheduler. You can now find all scheduled actions in WooCommerce - Status - Scheduled Actions.
Updated: Carrier property in Order entity made non-nullable.
Updated: Automatic prefixing of vendor dependencies.
Fixed: Correct logging of errors that may occur when updating the table of orders or carriers.
Fixed: Repeated packet synchronization now works correctly.
Fixed: Packet auto submitter now correctly handles orders with empty payment methods.
Fixed: API error on order grid no longer shows for forced packet cancellation.
Fixed: Checkout validation no longer triggers warning for empty checkout data.
Fixed: Sender validation error no longer triggers more than once during fresh plugin setup.
Fixed: Several minor bugs.

= 1.5.4 =
Fixed: An error that would occur when opening order detail for orders to external carriers pickup points after changing the delivery address.
Added: The list of parameters, which are being logged into the console of the web browser now also contains the API key.

= 1.5.3 =
Added: A filter to modify the HTML generated for use in email.
Updated: When changing the delivery point in the administration, we will not calculate and display the shipping price in the widget, because it is already stored in the order.
Fixed: The shipment number is now a string so that API interaction works correctly when using 32-bit PHP.
Fixed: Proper indentation of the Packeta header from WordPress notices.

= 1.5.2 =
Fixed: Displaying an order with a shipping method that doesn't have coupons enabled, with free shipping, and with a coupon used now doesn't throw an error.
Fixed: For international shipping, the wrong shipping currency was being passed to the widget.
Fixed: The plugin stopped working if the delivery country was changed in the order detail to a country not supported by the selected shipping method.
Fixed: Failed communication with the Packeta's internal API will no longer result in an error.

= 1.5.1 =
Updated: Viewing the log and printing labels is now possible with the manage_woocommerce permission, which is part of the "Shop Manager" role.
Updated: We are extending the packeta_shipping_price filter with another parameter (carrier ID, free shipping limit, prices for individual weight limits). Using this filter, you can set a new shipping price, for example, according to the price of the order.
Updated: It is no longer possible to select today's date in the calendar in the "postponed delivery" function.
Fixed: When using a payment plugin with a hyphen in its name (e.g. gopay-inline), our plugin crashed. Now everything works as expected.
Fixed: If the internal API of Packeta is unsuccessfully called (e.g. due to firewall settings), the plugin will no longer crash.

= 1.5.0 =
Added: In the list of orders, an exclamation mark icon is now displayed, which informs about an unsuccessful action (sending/cancelling a shipment, printing a label).
Added: Possibility to automatically open widget when shipping is selected in the checkout.
Added: Automatic order submission.
Added: Possibility to auto-change order status after packet submission and after auto-submission.
Added: Possibility to verify the delivery address in order detail in administration.
Added: It is now possible to round the cash on delivery value when sending a shipment to our system.
Added: It is now possible to send a shipment also from the order details in the administration.
Added: For each category, it is possible to disable specific Packeta carriers.
Added: The plugin now supports free shipping coupons. It is possible to set whether it will also apply to surcharges with specific carriers.
Added: If you do not have a weight set for the products, you can now set a default shipment weight.
Added: If the carrier does not support cash on delivery, it is now not possible to choose a cash on delivery payment at the checkout.
Added: You can now set a planned delivery for the order (the shipment will not be delivered before the specified date).
Added: A planned task to automatically download the list of carriers. The changes made in the list of carriers are now stored in the log.
Updated: The icon for sending the order to Packeta is no longer displayed if all mandatory parameters (e.g. weight) have not been entered for the order.
Updated: Improved compatibility with templates that modify the checkout (e.g. Elementor). In the past it happened that with some more complex third party templates, it was not possible to complete the order.
Updated: The plugin now remembers the filter settings in the list of orders even after some action has been taken (e.g. sending a shipment).
Updated: Some translations have been updated.
Fixed: The information about sending the shipment was written twice in the log. Now it only logs in correctly once.

= 1.4.3 =
* Added: Database server version to options export

= 1.4.2 =
* Added: Shop url in settings export
* Added: Checkout widget language filter packeta_widget_language
* Updated: logging widget options to console, appIdentity update
* Fixed: Product-carrier limitation now works properly (bug found in 1.4.1)
* Added: Packet status tracking options page success message
* Added: Link to a questionnaire at the dashboard
* Fixed: Widget backwards compatibility break
* Updated: External carrier pickup point detail link is no longer displayed
* Fixed: The translations have been modified to load correctly from wordpress.org

= 1.4.1 =
Added: New filter packeta_shipping_price. With the packeta_shipping_price filter, you can adjust the shipping price shown during checkout.
Fixed: checking return type of product get_meta.
Fixed: Product-carrier limitation user interface for product creation.
Fixed: Show all enabled payment methods in plugin settings.
Fixed: Product-carrier limitation.
Fixed: Checkout widget button visibility handling on no customer address filled.
Updated: Filter packeta_create_packet updated to accept array of packet attributes instead of order entity.
Updated: Packet status tracking interface and default values.
Updated: Refactor of function that gets all available packeta shipping methods.
Updated: small edit of translation strings.

= 1.4 =
Fixed: Performance optimization for loading the list of orders
Fixed: Label print edge case error
Fixed: Woocommerce Currency Switcher compatibility
Fixed: ManageWP Worker plugin hack fix to be compatible with ManageWP service
Updated: Support for Divi templates made more universal
Updated: Packaging weight plugin option re-labeled
Updated: removal of widget button container class "place-order", providing compatibility with WP Germanized plugin
Added: Possibility to alter optional packet parameters before submission to Packeta API
Added: Custom order number support
Added: Filter for altering packet data
Added: Compatibility with Back In Stock Notifier plugin
Added: Age verification fee
Added: Possibility to cancel order submission to Packeta
Added: Shipping checkout rate per product limitation
Added: Order - log relation and related user interface
Added: Dimensions (length, width, height) to edit modal panel at order list
Added: Multisite support
Added: Packeta log auto-deletion via cron
Added: Dashboard support widget
Added: Tax to COD surcharge and Age verification fee
Added: Stockie theme support
Added: Calculation of exceeding the Free shipping limit without discount from coupons
Added: Free shipping limit is triggered by cart price including VAT
Added: Support for payment plugins of 3rd parties e.g. TORET GoPay etc.
Added: Packeta button in main menu moved by default to the last position. Final order can be affected by other installed plugins.
Added: Support for CURCY - Multi Currency for Woocommerce plugin
Added: Limited support for "Multivendor Marketplace Solution for WooCommerce - WC Marketplace" (WCMP) plugin
Added: Packet status synchronization
Added: Filter to exclude order statuses when filtering orders
Added: Price conversion filter

= 1.3.2 =
* Fixed: Other shipping methods support

= 1.3.1 =
* Fixed: Order product loading for age verification service
* Updated: For each order is a separate Packeta log
* Added: Plugin options export extended with installed plugins
* Added: Admin order grid weight column

= 1.3.0 =
* Fixed: Some Elementor and some Divi checkouts are now supported
* Fixed: Plugin translations
* Added: currency-switcher.com compatibility
* Added: API Log - added packetAttributes if the packet was successfully sent
* Added: Possibility to choose widget button checkout location in plugin settings
* Updated: Checkout widget button after transport methods styling updated

= 1.2.6 =
* Added: New plugin setting that enables replacing shipping address with pickup point address
* Updated: Label options naming in Packeta plugin options page
* Updated: Show notification when log page doesn’t contain any logs
* Updated: Minor code issues resolved
* Fixed: Actions run on deleted order now give proper error messages
* Fixed: Slovak and czech translations related to label printing
* Fixed: Plugin now ignores empty order item product when calculating order weight
* Fixed: The display of filter links has been limited to the order overview page
* Fixed: Delete order from custom table after deleting woocommerce order
* Fixed: Delete all custom table records linked to permanently deleted orders
* Fixed: Carrier weight rule duplicate validation
* Fixed: Order modal weight field validation

= 1.2.5 =
* Fixed: Packeta plugin is now compatible with Plugins making javascripts load asynchronously in checkout

= 1.2.4 =
* Updated: new HD widget library URL

= 1.2.3 =
* Added: Packeta admin menu icon
* Added: Link to documentation to show on "Installed plugins" page
* Fixed: Packeta plugin no longer throws error during upgrade with DEBUG_MODE enabled

= 1.2.2 =
* Fixed: Plugin main file directory retrieval updated due to renaming packetery.php to packeta.php
* Fixed: Removed tracy examples with errors to pass wordpress.org sniffer

= 1.2.1 =
* Updated: First version to be released at wordpress.org

= 1.2.0 =
* Added: Primary key for carrier table
* Updated: Packeta order meta data moved from posts to custom table
* Updated: Logger uses custom database table
* Updated: Only 3 decimal places are accepted for order weight
* Updated: JavaScript and CSS files are now loading conditionally
* Fixed: Packeta checkout validators now trigger only if Packeta shipping is selected
* Fixed: Label print page now shows the correct number of labels that will be printed
* Fixed: Widget button now shows even if no country was selected on checkout page load
* Fixed: Javascript dependencies added where missing
* Fixed: Non-Packeta order submission to Packeta API no longer creates PHP error
* Fixed: Label printing now accepts trashed orders
* Fixed: Packeta order modal now dynamically calculates weight if no weight is provided
* Fixed: Packeta logger now supports emote characters
* Fixed: Deactivating WooCommerce plugin while having Packeta plugin activated no longer crashes the entire site

= 1.1.1 =
* Fixed: Overweight orders now never have shipping for free
* Fixed: Packet API submissions now always include order currency

= 1.1.0 =
* Added: Information about the count of printed labels and "back" link added to label offset setting form
* Added: Possibility to print the same labels again in a single session in the label print page
* Added: Possibility to print single label from order list
* Added: Possibility to submit single order to Packeta from order list
* Added: Admin pickup point picker in order detail
* Added: Packaging weight in plugin settings
* Added: Checkout address validation
* Added: Possibility to edit order weight in order list
* Added: List of active carriers added to carrier settings section
* Added: Shipment lists printing
* Added: Sender verification in plugin settings
* Added: SK translation
* Updated: Carrier settings interface
* Updated: Packetery buttons in order list
* Updated: Flash messages are always first in message stack

= 1.0.7 =
* Fixed: The label print page displays a message to the user if no suitable orders are selected
* Fixed: Some environments caused error due PHPDocs being removed by OPCache
* Fixed: Order list filters can now be combined

= 1.0.6 =
* Added: Default cash-on-delivery surcharge
* Added: Cash-on-delivery surcharge was separated from shipping cost and is shown in order fees during checkout
* Updated: Carrier settings page errors highlighted
* Fixed: Only available payment methods are available for selection in plugin settings

= 1.0.5 =
* Updated: Sender description
* Fixed: Cash-on-delivery payment method is always available for selection in Packeta plugin settings
* Fixed: Checkout refresh on payment method change happens only if the value really changes

= 1.0.4 =
* Added: If the creation of the carrier table fails, the user is informed and error is logged
* Updated: Settings export expanded to be even more helpful
* Fixed: Inputs in the cart implemented so as not to affect the appearance
* Fixed: Packeta logo CSS in cart made simple and compatible
* Removed: Dependency on intl library

= 1.0.3 =
* Fixed: Use of pickup point method in cart with billing only setting enabled

= 1.0.2 =
* Fixed: Broken relative URLs in multiple places

= 1.0.1 =
* Added: Settings export to help solve various issues
* Updated: Logger no longer deletes older records
* Fixed: User no longer sees messages from other sessions
* Fixed: Logger handles double quotes in error messages
* Fixed: Corrected the count of orders in filtering links
* Fixed: Save carrier's maximum weight correctly as a float
* Fixed: Carrier name input width css rule to cover all carriers
* Fixed: Pickup point id will be stored as a string, because external carriers may require it
* Fixed: Exception handling during CreatePacket API call - faultstring used when no detail property is returned
* Fixed: CLI error - plugin now does not bootstrap in CLI environment
* Fixed: Exception when HTTP response headers are already sent - Plugin now does not bootstrap in such case

= 1.0.0 =
* Initial version
