=== Canada Couriers for WooCommerce ===
Contributors: catcodestudio
Tags: canada post, purolator, shipping rates, shipping labels, deliver to post office
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 7.0
WC tested up to: 11.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Canada Post and Purolator live rates at checkout, labels from the order, Deliver to Post Office and tracking for shops in Canada.

== Description ==

Ship with your own Canada Post and Purolator accounts from the WooCommerce order screen. No monthly fee to a shipping platform and no labels bought through a reseller: the plugin talks to the carriers directly with your own API keys, so you pay your own commercial or small business rates.

**Free**

* Three delivery methods for your Canada shipping zone: Canada Post to the address, Canada Post Deliver to Post Office, Purolator to the address.
* Live rates of the services you choose (Regular Parcel, Expedited Parcel, Xpresspost, Priority; Purolator Ground and Express with their time options), with the business days the carrier expects, on the classic and the block checkout.
* Or a flat price instead. Free from an order amount or with a free-shipping coupon, weight limit per method. When the carrier does not answer, the method offers the flat price or hides — your choice.
* Deliver to Post Office: the buyer picks a Canada Post office near them at checkout. The picker shows up only for its own method and never writes into the buyer's address fields.
* A label from the order screen: PDF for a 4 × 6 in label printer or a letter sheet.
* Canada Post with a contract (paid on the account or the card on file) or without one (Solutions for Small Business, paid with the card on file).
* Canada Post through an app of its new Developer Portal (API key and secret, OAuth), or with the keys of the old Developer Program (username and password).
* Tracking link in the order, on the account page and in the e-mails. Refresh the status with one click.
* Cancelling a label: Purolator voids it; Canada Post voids a shipment not yet sent or takes a refund request.
* The PHP SOAP extension is not needed.
* Interface in English and French (Canada).

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

* Labels created automatically when an order reaches the status you choose.
* Bulk actions in the orders list: create labels and print them all at once.
* Several parcels on one shipment, for delivery to the address.
* Signature on delivery, and Canada Post coverage on the label.
* Live rates adjusted by a percentage or an amount, up or down.
* Fixed delivery prices per weight.
* Hourly status sync, order notes and automatic completion on delivery.

== Installation ==

1. Install and activate WooCommerce and this plugin.
2. Open WooCommerce → Canada Couriers, fill in the sender and the API details of the carriers you use, save and check the connection.
3. Add the delivery methods to your shipping zone for Canada in WooCommerce → Settings → Shipping and choose the services each one offers.
4. Open an order and create the label in the Canada Couriers box.

== Frequently Asked Questions ==

= Which accounts do I need? =

For Canada Post: a business account with a customer number and an app on the Canada Post Developer Portal (its API key and API secret), or the keys you already have from the old Developer Program; a contract ID if you have a commercial contract. For Purolator: a business account and E-Ship web services keys with your billing account number.

= Are the rates at checkout my own rates? =

Yes. Canada Post prices with your customer number (and contract, if you have one), Purolator with your billing account. WooCommerce adds the taxes, so the plugin uses the carriers' prices before tax.

= Which Canada Post services can be delivered to a post office? =

Expedited Parcel and Xpresspost: Canada Post offers Deliver to Post Office with these two only. The buyer's phone number and e-mail go on the shipment, because Canada Post notifies the buyer when the parcel arrives at the post office.

= Can I cancel a label? =

Purolator voids a shipment until it is picked up or manifested. Canada Post voids a shipment that is not sent yet; for a sent one the plugin requests a refund, and Canada Post decides on it.

= Which countries does it ship to? =

Within Canada. Shipments to the United States and other countries need customs data and are not part of this version.

== External services ==

The plugin connects only to the carriers the shop owner sets up, and only for the actions below.

**Canada Post** (api.canadapost-postescanada.ca for Developer Portal apps; soa-gw.canadapost.ca and ct.soa-gw.canadapost.ca for the old Developer Program keys), operated by Canada Post Corporation.

* At checkout and in the settings: the postal code of the buyer, the shop's postal code, the parcel weight and, when set, the box size are sent to get live rates. The API key and secret (to get an access token) or the old keys, and the customer number, are sent to sign in.
* At checkout for Deliver to Post Office and in the settings: a postal code is sent to find post offices.
* When the shop creates a label: the buyer's name, address, e-mail address and phone number, the parcel weight, the order number and the chosen post office are sent; the label PDF is downloaded from Canada Post.
* When the shop cancels a label: the shipment, and for a refund the shop's e-mail address, are sent.
* When the status is refreshed: the tracking number is sent.

Privacy: https://www.canadapost-postescanada.ca/cpc/en/our-company/transparency-and-trust/privacy-centre/privacy-policy.page

**Purolator** (webservices.purolator.com, devwebservices.purolator.com for the development keys), operated by Purolator Inc.

* At checkout and in the settings: the postal code, city, province and when available the street of the buyer, the shop's address and phone, the parcel weight and, when set, the box size are sent to get live rates. The keys and the billing account number are sent to sign in.
* When the shop creates a label: the buyer's name, address, e-mail address and phone number, the parcel weight and the order number are sent; the label PDF is downloaded from Purolator.
* When the shop cancels a label or refreshes the status: the tracking number is sent.

Privacy: https://www.purolator.com/en/privacy

The Pro licence check connects to catcode.com.ua and sends the licence key and the site address.

== Changelog ==

= 1.0.0 =
* First version: Canada Post and Purolator, live rates on the classic and the block checkout, Deliver to Post Office, labels, tracking, cancelling; Pro automatic and bulk labels, several parcels, signature, coverage, rate adjustments, prices per weight, hourly status sync.
