=== Parcel Pilot – Australia Post Labels for WooCommerce ===
Tags: australia post, shipping labels, mypost business, eparcel, woocommerce shipping
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 7.1
WC tested up to: 11.1
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Ship WooCommerce orders with Australia Post: one MyPost Business import file for all your orders, or labels straight from an eParcel contract.

== Description ==

Get Australia Post shipments out of WooCommerce without retyping a single address. Two ways to pay:

* **MyPost Business, pay per label.** Tick your orders, choose "Parcel Pilot: export to MyPost Business", and download one file in Australia Post's own import format. Upload it in MyPost Business (Orders > Bulk import), pay for and print the labels there, then paste the tracking numbers back into Parcel Pilot: your customers are emailed their tracking link and the orders are completed. No keys and no extra accounts.
* **eParcel contract.** Labels are created and printed right inside WooCommerce, and postage is billed to your Australia Post account when you lodge.

= Shipments =

* One click on an order, or the button on the Orders list, sets up the shipment with the right service, box and weight.
* Bulk: tick orders and choose the Parcel Pilot bulk action. MyPost Business gets one import file for every ticked order; eParcel gets one PDF with every label.
* Partial and split shipments: choose which items and how many go in each shipment, with up to 20 parcels in one shipment.
* Packaging presets (box sizes and empty weight), including Australia Post satchels and boxes for MyPost Business and flat-rate product codes for eParcel.
* Parcel Post and Express Post, picked automatically from the customer's shipping method.
* Signature on delivery and extra cover; authority to leave and delivery instructions for eParcel.
* Address check against Australia Post's rules before anything is sent.
* Several Ship-from locations.

= MyPost Business import file =

* Every column in Australia Post's domestic import template, one row per parcel.
* "Order 1234" printed on each label so parcels are easy to match up.
* Checks MyPost Business's limits first (weights, sizes, extra cover), so the file imports cleanly.
* Shipments already in a file are never put in a new one by accident, so nothing is paid for twice.
* A Waiting for tracking screen: paste each tracking number and save, one at a time or a whole day's at once.

= eParcel =

* Thermal (4x6 / A6) or office-printer (A4) labels, branded or for pre-printed stationery.
* End-of-day lodgement (Australia Post order / manifest) with the order summary PDF.
* Hands-off mode (optional): shipments created automatically when an order is paid, "Print new labels" in one click, and automatic daily lodgement at a set time.
* Hourly tracking checks and an optional "Delivered" order status.

= Fulfilment and tracking =

* Packing slips and pick lists (single orders or bulk).
* Tracking in the customer's account, in the Completed email, and in the "Order shipped" email for partial shipments.
* Search orders by tracking number.

= Try it first =

Demo mode works without any keys. With MyPost Business the file is real, but adding tracking numbers never completes orders or emails customers. With eParcel, labels are samples stamped NOT VALID FOR POSTAGE.

Works with both WooCommerce order storage types (HPOS and legacy). Australian addresses only: overseas orders are not supported.

== What you need ==

= MyPost Business (pay per label) =

A MyPost Business account with a card saved. It's free from Australia Post. Nothing else: Parcel Pilot makes the import file and you upload it yourself.

= eParcel contract =

Australia Post only gives Shipping & Tracking API keys to businesses with an eParcel or StarTrack contract (aimed at 2,000+ parcels a year, with a business credit account). Register interest at developers.auspost.com.au. They issue Testbed keys first.

== Installation ==

1. Plugins > Add New > Upload Plugin, choose parcel-pilot.zip, then Activate. WooCommerce must be active.
2. Click "Set up labels" in the notice, or go to WooCommerce > Parcel Pilot > Settings. Fill in Ship from and Packaging. Leave Mode on Demo to try it.
3. MyPost Business: choose "MyPost Business, pay per label" and Save. For your own boxes, set a length, width and height on each one under Packaging; MyPost Business needs them.
   eParcel: choose "eParcel contract", Mode Testbed, enter the API key, password and account number, Save, then Test connection. Pick your services. Australia Post reviews your test labels before approving Live.
4. Switch to Live.

= Daily use with MyPost Business =

1. Orders: tick orders > Bulk actions > "Parcel Pilot: export to MyPost Business" > Apply, then click "Download MyPost Business file".
2. In MyPost Business: Orders > Bulk import > choose the file > Import orders. Pay for and print the labels.
3. WooCommerce > Parcel Pilot > Waiting for tracking: paste each tracking number and click "Save tracking numbers".

= Daily use with eParcel =

1. Orders: tick orders > Bulk actions > "Parcel Pilot: create & print labels" > Apply.
2. Print the labels, packing slips and pick list from the results screen.
3. WooCommerce > Parcel Pilot > Lodge parcels > "Lodge ticked shipments" when the parcels go out.

== Frequently Asked Questions ==

= Do I need an eParcel contract? =

No. Choose "MyPost Business, pay per label": you pay for each label in your own MyPost Business account. An eParcel contract is only needed if you want postage billed to an Australia Post credit account.

= Why do I upload a file instead of Parcel Pilot buying the labels for me? =

Australia Post only lets its approved eCommerce partners buy MyPost Business labels from other software. The import file is Australia Post's own supported way to bring orders into MyPost Business, so you keep paying per label on your own account.

= Can I send overseas? =

Not yet. The plugin creates domestic Australian shipments only and refuses orders with an overseas shipping address.

= How do I cancel a shipment? =

On the order, click Cancel on the shipment. If it was already imported into MyPost Business, delete it there too; a label you've paid for can be refunded in MyPost Business. eParcel shipments can be cancelled until they are lodged.

= Does it slow down my store? =

No. It only runs on the order screens, its own pages and (for eParcel) an hourly background tracking check. Nothing loads on the shop front except the tracking block in the customer's account.

= Is customer data kept in the debug log? =

The debug log is off by default. When it's on, customer names, street addresses, emails and phone numbers are masked before anything is written.

= What happens to my data if I delete the plugin? =

Settings are always removed. Shipment records, tracking numbers and saved label PDFs are kept unless you tick "When deleted" under Settings > Troubleshooting.

== Screenshots ==

1. Bulk export: a day's orders in one MyPost Business import file, with packing slips and a pick list.
2. Waiting for tracking: paste the tracking numbers from MyPost Business and customers are emailed their link.
3. The Orders list shows what's exported, what's paid for, and every tracking number.
4. The Australia Post panel on an order: one shipment paid for in MyPost Business, with the rest of the order ready to send.
5. Settings: choose MyPost Business (pay per label) or an eParcel contract, and try everything in demo mode first.

== External services ==

With MyPost Business, Parcel Pilot makes no outside requests: you download the import file and upload it to MyPost Business yourself.

= Australia Post Shipping & Tracking API (eParcel only) =

Used to check addresses, create, price and cancel shipments, download labels, lodge orders (manifests) and check delivery status. Only after the store owner chooses "eParcel contract" and switches Mode to Testbed or Live.
Sent when a label is created, cancelled or lodged, when "Test connection" is clicked, and during the hourly tracking check: the store's API key and account number, the sender address, and the order's recipient name, business name, delivery address, email, phone, delivery instructions, parcel sizes and weights, item descriptions and values.
Hosts: digitalapi.auspost.com.au (and an OAuth token URL if the store owner enters one).
Terms: https://auspost.com.au/terms-conditions
Privacy: https://auspost.com.au/privacy

= Australia Post tracking page =

Tracking numbers in emails and the customer's account link to auspost.com.au/mypost/track. Nothing is sent until the customer clicks the link.

== Privacy ==

The plugin adds suggested text to Settings > Privacy > Policy guide, describing which delivery details go to Australia Post. Review it and add it to your privacy policy.

== Changelog ==

= 1.1.0 =
* New: MyPost Business import file. Export one order or a whole day's orders in Australia Post's import format, pay for and print the labels in MyPost Business, then add the tracking numbers on the new Waiting for tracking screen.
* New: "Set up labels" notice after a fresh install.
* New: suggested privacy policy text.
* New: option to delete shipment records and saved labels when the plugin is deleted.
* Changed: renamed from "AusPost Label Maker" to Parcel Pilot. Plugin folder, main file and text domain are now parcel-pilot; the menu is WooCommerce > Parcel Pilot.
* Changed: the debug log masks customer names, street addresses, emails and phone numbers.
* Changed: a .pot template is in the languages folder.
* Changed: passes the WordPress.org Plugin Check (including experimental checks) with no errors or warnings.
* Changed: declares WooCommerce as a required plugin, tested with WordPress 7.1 and WooCommerce 11.1.
* Changed: MyPost Business works with no third-party account.
* Changed: the MyPost Business file is written the way MyPost Business's importer expects (tested with a real account), and sender phone numbers are converted to the 10 digits it requires.
* Changed: customers see plain delivery statuses ("On its way", "Delivered") in emails and their account.
* Changed: with MyPost Business, settings only show what applies to it, and Waiting for tracking works on phones.

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.1.0 =
MyPost Business now works through Australia Post's own import file, with no extra account. Recommended for all stores.
