=== South Africa Couriers for WooCommerce ===
Contributors: catcodestudio
Tags: the courier guy, pargo, shiplogic, south africa, pickup points
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The Courier Guy and Pargo in one plugin: door delivery, lockers and Pargo pickup points at checkout, waybills, labels, tracking.

== Description ==

Two South African couriers in one WooCommerce plugin, with your own account and API access at each of them: The Courier Guy (through its Ship Logic API) and Pargo.

**Free**

* Four shipping methods for your shipping zones: The Courier Guy door to door, The Courier Guy locker, Pargo pickup point, Pargo door to door.
* Fixed price, free from an order amount (counted the way the cart shows it), free-shipping coupons, weight limit per method. A The Courier Guy service level (for example ECO or OVN) per method, or the cheapest one The Courier Guy offers for the parcel.
* Pickup point picker on the classic and on the block checkout: the list starts with the points near the buyer's city and post code; a suburb, a city or a four-digit post code can be typed. Opening hours are shown when the courier sends them.
* The picker appears only while a pickup-point method is chosen. The buyer's address fields are never rewritten in the browser, so switching to door delivery keeps the buyer's own address, and the address saved in the buyer's account stays theirs.
* The order is refused on the server when a pickup-point method has no point, or a point the courier never listed — for any checkout. Other shipping methods are never blocked, and a point picked earlier never lands in an order shipped otherwise.
* The point is stored on the order (HPOS compatible), optionally written into the shipping address, and shown on the thank-you page, in the account and in e-mails, with tracking links.
* Waybill from the order screen: weight, cash on delivery at Pargo pickup points for the payment methods you choose, declared value for The Courier Guy, PDF label (The Courier Guy waybill on A4 or parcel stickers; the Pargo label), status refresh for The Courier Guy, cancel. Orders shipped with another method can be sent too — pick the courier in the box.
* Pargo staging supported, with the staging account Pargo gives you.
* Passwords and keys stored encrypted.

**Pro** (7-day free trial from the settings page)

* Live The Courier Guy and Pargo rates from your own account at checkout, with a markup in % and a fixed amount, rounding, and the fixed price as a fallback when the courier is slow.
* Waybills created automatically when an order reaches the status you choose.
* Bulk actions in the orders list: create waybills, print all labels at once.
* Several parcels per The Courier Guy waybill to the address (pickup points and Pargo take one parcel).
* Hourly The Courier Guy status sync with order notes, "Completed" once the courier reports the delivery, and a status of your choice when the parcel is returned or undeliverable.

You need an account with API access at each courier you use: The Courier Guy (an API key from its Ship Logic portal) and Pargo (API user name and password; Pargo issues them on request, starting with staging).

== External services ==

This plugin connects to the couriers you configure, only with the credentials you enter:

* The Courier Guy, Ship Logic API (api.portal.thecourierguy.co.za) — pickup points (lockers) near a place, rates (to pick the service level of a waybill, and for the Pro live rates), create shipments, waybill and sticker labels, tracking, cancel.
* Pargo API (api.pargo.co.za, or staging api.staging.pargo.co.za) — sign-in, pickup points near a place, quotations, create orders and their labels.

Sent when you create a waybill (or Pro automation does it for you): the order number, weight, parcel size and number of parcels, the cash on delivery amount (Pargo pickup points), the declared value if you enabled it, the parcel description, the sender details from the settings, and the buyer's name, phone, e-mail and address or chosen pickup point. While the buyer is at checkout: the place typed or the buyer's city and post code, to list pickup points; with the Pro live rates on, also the delivery address or point and the weight. Tracking links open the couriers' public tracking pages.

Terms and privacy: https://www.thecourierguy.co.za/ and https://pargo.co.za/

The Pro licence check connects to catcode.com.ua (licence key and site address), only after you enter a key or start the trial.

== Installation ==

1. Install and activate the plugin.
2. WooCommerce → South Africa Couriers: fill in the sender (the address The Courier Guy collects from) and the account of each courier you use, and save.
3. Click "Check the connection" and "Find pickup points" to see that the courier answers.
4. WooCommerce → Settings → Shipping → your South Africa zone → Add shipping method → the methods marked "(South Africa Couriers)".

== Frequently Asked Questions ==

= A pickup-point method does not appear at checkout =

It appears once that courier's account is saved, for the countries chosen in the method. Check also the weight limit of the method.

= Which service level does The Courier Guy waybill use? =

The code set on the shipping method (for example ECO or OVN), or, when it is empty, the cheapest service level The Courier Guy offers for that parcel and destination. The code must exist on your account; otherwise the waybill is refused with a message.

= Can I collect cash on delivery? =

Only at Pargo pickup points: the amount goes with the Pargo order. The Courier Guy and Pargo door delivery do not collect cash from this plugin, so for such orders set the amount to 0 in the order box.

= Can I cancel a Pargo waybill? =

Pargo has no cancel call in its API. "Cancel" marks the waybill cancelled in the shop and adds an order note; cancel it in myPargo too.

= The live rate shows the fixed price =

The courier did not answer within a few seconds, refused the request, or returned 0. Turn on the debug log (source south-africa-couriers) to see why.

== Changelog ==

= 1.0.0 =
* First release: The Courier Guy (door to door, lockers) and Pargo (pickup points, door to door); pickup point picker on the classic and the block checkout; waybills, labels, The Courier Guy tracking, cash on delivery at Pargo points; Pro live The Courier Guy and Pargo rates, automatic and bulk waybills, bulk labels, several parcels, hourly status sync with automatic statuses.
