=== Order Sync with Royal Mail Click & Drop for WooCommerce ===
Contributors: catcodestudio
Tags: royal mail, click and drop, shipping, tracking, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send WooCommerce orders to Royal Mail Click & Drop and bring the tracking numbers back to the order.

== Description ==

For UK shops that post with Click & Drop. Orders go across from the order screen or the orders list, you print and despatch in Click & Drop as usual, and the tracking number comes back to the WooCommerce order: on the order itself, in the buyer's account and in the email.

This is an independent integration. Royal Mail and Click & Drop are trademarks of Royal Mail Group Ltd. This plugin is not affiliated with or endorsed by Royal Mail.

= What it does =

* Sends one order from the order screen, or many from the orders list.
* Fills in the name, address, phone, email, items, weight, value and the customer note.
* Package format and weight can be changed on each order before sending.
* Sets a default service and carrier from your own Click & Drop account.
* Guards against sending an order twice: an order already sent stays sent, and if a connection drops halfway, the order is looked up in Click & Drop before it can go again.
* Refused orders show the reason Click & Drop gave, on the order and on the settings page.
* Reads tracking numbers every hour and on a button. Orders with several packages get a number per package.
* On despatch it can change the order to Completed and email the tracking number to the buyer.
* Shows tracking on the buyer's order page, in customer emails and in the orders list.
* Works with High-Performance Order Storage. It reads the finished order, so the theme and the type of checkout make no difference, and the only thing it adds to the storefront is the tracking lines.

= Pro =

* Orders sent on their own at the statuses you choose, with retries if Click & Drop does not answer.
* A Click & Drop service and package format for each shipping method.
* Label PDFs from the order and the orders list. Click & Drop gives label PDFs through its API to OBA accounts only.
* Customs code, origin and description per product, IOSS number and delivery term.

Pro is sold on [catcode.com.ua](https://catcode.com.ua/modules/catcode-order-sync-with-royal-mail-click-drop-for-woocommerce/), with a 7-day trial you start yourself.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. In Click & Drop go to Settings > Integrations, add Click & Drop API and copy the key from the row of the integration.
3. In WooCommerce > Click & Drop paste the key and save.
4. Add weights to your products, or set a default weight.

== Frequently Asked Questions ==

= Do I need a Click & Drop account? =

Yes, and an API key from it. A Click & Drop account can have one API integration.

= I already connected my shop in Click & Drop under Channels and stores. =

Use one or the other, otherwise the same order can arrive twice.

= Where do I print labels? =

In Click & Drop, as usual. Once a label exists, the tracking number comes back to the order.

= Why is the integration not shown as connected in Click & Drop? =

Click & Drop says an API integration shows as connected after the first successful call. Send an order and look again.

= Why does an order have no tracking number? =

A number appears once Click & Drop has one, usually after a label exists. Services without tracking have none, and the order still shows as despatched.

= I changed an order after sending it. =

The Click & Drop API has no way to update an order, so change it in Click & Drop too. The same goes for cancelled orders: the order note reminds you to remove them there.

= What about SKUs? =

They are off by default, because Click & Drop creates or overwrites a product of its own for each SKU it receives.

= Tracking does not update. =

The hourly check runs through the WooCommerce scheduler, which needs site traffic or a real cron job. WooCommerce > Status > Scheduled Actions lists the job as catcode_rmcd_poll.

= Parcelforce or another carrier? =

The link in the tracking number points to Royal Mail. A developer can change it with the catcode_rmcd_tracking_url filter.

== External services ==

This plugin connects to the Royal Mail Click & Drop API at api.parcel.royalmail.com, the service that receives the orders you post through your Click & Drop account.

* When an order is sent: the order reference and date, recipient name, company, address, phone and email (the last two can be switched off), item names, quantities, values and weights, order totals, the customer note, and the service and carrier you chose.
* When tracking is checked: the Click & Drop order number.
* When you test the connection: your API key, which goes with every request.

Service terms: https://help.parcel.royalmail.com/hc/en-gb/articles/360004605273
Privacy notice: https://www.royalmail.com/privacy-notice

The Pro build connects to catcode.com.ua to activate a licence key and to check for updates. It sends the key, the site address, the plugin version and, for a trial, the e-mail you enter. Terms: https://catcode.com.ua/terms/ Privacy: https://catcode.com.ua/privacy/

== Changelog ==

= 1.0.1 =
* Settings: the selects are wide enough for their longest option, so "As saved on the account" no longer runs under the arrow.

= 1.0.0 =
* First release.
* Pro updates arrive through Dashboard > Updates.
