=== Meest Poshta Shipping for WooCommerce (CatCode) ===
Contributors: catcodestudio
Tags: meest, shipping, delivery, ukraine, woocommerce
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Meest Poshta delivery for WooCommerce: branch and parcel-locker picker at checkout, rates, parcels, statuses.

== Description ==

The customer picks a city and a Meest branch or parcel locker right in the checkout (classic and block checkout). The store creates the parcel in Meest by hand or automatically when the order reaches a chosen status, cancels it while it has not moved, and follows its status in the shipment journal.

Free:

* city and branch / parcel-locker picker with a local directory cache (the checkout keeps working when the carrier API blinks);
* flat shipping cost, or the live Meest rate for the chosen branch (UAH stores);
* free shipping from an order total;
* parcel creation from the order screen, the journal or on an order status;
* parcel cancellation, manual status refresh, shipment journal;
* encrypted API password, credentials test, rate check.

Pro (7-day trial, no card):

* cash on delivery on the parcel for the payment methods you choose;
* 100×100 sticker printing;
* hourly status refresh.

A purchased licence keeps the Pro features for good; its term covers updates and support.

= Requirements =

A Meest contract with openAPI access: the login, password and contract ID come from your Meest manager.

== Installation ==

1. Upload and activate the plugin.
2. WooCommerce → Settings → Shipping → Meest Poshta: API login, password, contract ID → Test access.
3. Pick the sender city and branch, fill the sender name and phone, save.
4. Add "Meest Poshta" to a shipping zone.

== External services ==

* Meest openAPI (https://api.meest.com/v3.0/openAPI) — city and branch directory, rates, parcels, statuses and stickers. Called only with the credentials you enter. Terms: https://meest.com
* CatCode licence server (https://catcode.com.ua/wp-json/catcode/v1/) — only when you activate or re-check a key or start the trial; sends the key or e-mail and the site address.

== Changelog ==

= 1.0.4 =
* Fixed: the branch list could stay on "Loading branches…" after picking a city until the field was clicked again; it now appears as soon as it loads.
* Fixed: a guest who creates an account at checkout (or on the order confirmation page) no longer gets the branch as the new account's address.

= 1.0.3 =
* Fixed: after a Meest order WooCommerce saved the branch as the logged-in buyer's billing and shipping address (block and classic checkout), so the next checkout offered the branch instead of the buyer's own address. The order still gets the branch; the account keeps the buyer's address.

= 1.0.2 =
* Switching from Meest to another shipping method puts the buyer's own street, city and postcode back into the address fields: before, a courier order left with the Meest branch as its delivery address.
* Block checkout: the branch picker follows the rate selected in the cart, so it also shows when Meest is the only rate and is printed without a radio button.
* Picking a city or a branch in the list no longer misses the click on the block checkout.

= 1.0.1 =
* Stored API keys and passwords are encrypted with AES-256-CBC + HMAC instead of a character-by-character XOR loop. Hosting antivirus scanners flagged the XOR loop as obfuscated code and deleted the file, which took the whole plugin down. Values saved by 1.0.0 are still read; they are re-encrypted the next time the settings are saved.

= 1.0.0 =
* First release.
