=== UA Checkout ===
Contributors: allidevelop
Tags: checkout, nova poshta, ukraine, cash on delivery, ukrposhta
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

One-page checkout for Ukrainian WooCommerce stores: Nova Poshta and Ukrposhta at real rates, cash on delivery and Ukrainian online payments.

== Description ==

UA Checkout replaces the WooCommerce checkout page with its own one-page checkout made for Ukraine. The buyer picks a Nova Poshta branch or parcel locker or an Ukrposhta office, sees the delivery price before paying, and pays the way the store accepts: cash on delivery, a partial prepayment, or online through the store's own monobank, LiqPay, WayForPay and other Ukrainian payment accounts. The order appears in WooCommerce as usual.

From the UA Checkout dashboard the store can also create Nova Poshta and Ukrposhta waybills, issue fiscal receipts (Checkbox, Vchasno.Kasa), pass orders to a CRM and get Telegram notifications.

The plugin itself is a thin connector: it sends the buyer from "Proceed to checkout" to the UA Checkout page with the token of their own cart. Prices, delivery and the order are handled by UA Checkout through the WooCommerce APIs. Money goes straight to the store's own payment accounts; UA Checkout never receives buyers' money or card data.

The plugin is off until the site's administrator turns it on, and WooCommerce's own checkout stays in place whenever UA Checkout does not answer.

== External services ==

This plugin connects to UA Checkout (https://ua-checkout.com), a hosted checkout service, which provides the checkout page your buyers are sent to. Nothing is sent until an administrator ticks "Turn UA Checkout on for this site" under WooCommerce → UA Checkout. After that:

* On a visit to the checkout page (at most once a minute, cached), the plugin asks https://api.ua-checkout.com/woocommerce/config whether the UA Checkout checkout is on for this site. It sends the site's host name and the plugin version.
* When a buyer goes to the checkout and UA Checkout is on, the buyer's browser is redirected to the UA Checkout checkout page with the buyer's WooCommerce Store API cart token, plus any utm_*, fbclid and gclid parameters of that visit. UA Checkout reads the cart, and later creates the order, through the WooCommerce REST and Store APIs with the keys the store owner approved when connecting the store.

UA Checkout terms of use: https://ua-checkout.com/terms
UA Checkout privacy policy: https://app.ua-checkout.com/privacy

== Installation ==

1. Install and activate the plugin.
2. Connect the store in the UA Checkout dashboard (https://app.ua-checkout.com): "Connect a store" → WooCommerce.
3. In WooCommerce → UA Checkout, tick "Turn UA Checkout on for this site".
4. In the dashboard, turn the checkout on: "Test" shows it only to you (open the store with ?uac_preview=1), "On" shows it to every buyer.

== Frequently Asked Questions ==

= What happens if UA Checkout is unavailable? =

The plugin waits at most 3 seconds for an answer. Without one, buyers stay on the standard WooCommerce checkout.

= Can I try it without showing it to buyers? =

Yes. Choose "Test" in the UA Checkout dashboard and open your store with ?uac_preview=1. Only that browser is sent to UA Checkout; ?uac_preview=0 turns it off again.

= Which languages does the plugin support? =

The settings page is in English, Ukrainian and Russian. The checkout itself is in Ukrainian and English, and in Russian when the store turns that on.

== Changelog ==

= 0.2.0 =
* English strings with Ukrainian and Russian translations included.
* The readme describes the external service in detail.

= 0.1.1 =
* "Back to cart" on the UA Checkout page opens the store's cart at its real address.

= 0.1.0 =
* First version: redirect to the UA Checkout checkout, test mode, and WooCommerce's own checkout whenever UA Checkout is unavailable.
