=== North Shipping Manager ===
Contributors: northcreative
Tags: woocommerce, shipping, shipping labels, tracking, sendify
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
WC requires at least: 8.5
WC tested up to: 11.2
Stable tag: 0.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Shipping for WooCommerce with Sendify: compare rates, book, print labels and follow every shipment from the order.

== Description ==

North Shipping Manager connects WooCommerce to your Sendify account. From the order you compare live rates, book the shipment you choose, print the label and follow the parcel until it is delivered – without leaving WordPress.

A setup wizard takes you through it in about five minutes: connect Sendify, choose the sender that is printed on the shipping label and the place where the carrier picks up, adjust the ready-made package templates, choose how the suggested option is picked, set up label printing and customer emails, and switch on live booking.

= Shipping from the order =

* Live rates from Sendify, with a suggested option based on your own rule: cheapest, fastest, home delivery, service point or a preferred carrier.
* Booking with price confirmation: the price is checked again right before booking, and nothing is booked twice.
* The order list shows every order's package, shipping status and next step, with quick buttons to find shipping, book and print.
* A check before anything is sent to Sendify: a missing phone number, address or package size is shown on the order with what to fix.
* The service point nearest the customer is chosen automatically, and you choose the pickup day.

= Labels and documents =

* Labels in A4, on a label printer or on your own paper size. The label is scaled to fit the paper.
* Manifests, waybills, customs invoices and proof of delivery as PDF when Sendify provides them.
* The order's contents are printed on the label as the sender's reference.

= Packages and addresses =

* Package templates with a weight, so product weights are optional. Your default template is preselected on the order. When your products have weights, their total weight and the packaging weight are used.
* Sender and pickup place kept apart: the sender is what is printed on the label and shown in the tracking, and the pickup place is where the carrier collects. Instructions for the driver are included.

= Tracking and customer emails =

* Tracking on the order and in the order list, updated automatically.
* Customer emails when the shipping is booked, when the parcel is on its way and when it is delivered, with your logo, colours and texts. Your shop can also get an email when a shipment has a deviation (switch it on under Settings → Customer emails).

= Safe to try =

* Start with a key from Sendify's test environment (Sandbox): you can book without charges.
* With a key from the live environment, live booking is a separate switch. It stays off until you have chosen a sender and a return address and confirmed that bookings are charged by Sendify.
* Copies of the shop are recognised. On a staging site or a copy at another address, the plugin pauses live booking, tracking and customer emails, so the copy books nothing and emails no customers.
* A health check shows what is missing, and the built-in help guide answers the common questions.

You need a Sendify account and an API key from Sendify. Bookings are charged by Sendify according to your Sendify agreement.

Sendify is the only shipping connection today. More connections are planned.

= Plus and Pro =

North Shipping Manager is free and complete for booking, printing and tracking. Everything described above works without a licence. For stores that ship a lot or abroad there is a separate add-on with two levels, sold by North Creative Collective:

* **Plus** – the package template picked automatically by weight, Prepare automatically (every paid order gets a draft and a suggested option), Ship again on the same order, your own choice of service point – also in another town, bulk booking and all labels in one PDF, customs invoices prefilled from the order, return labels with service points, seven more email templates, your own tracking page in the store and review requests after delivery.
* **Pro** – everything in Plus, booking rules and advanced shipping rules, service point choice in the checkout, secret pickup places, your own list of HS codes, your own email template for each email, and North Return Manager Pro and North Packing Slips & Invoices Pro included.

Read more at [northcreativecollective.se](https://northcreativecollective.se/). The add-on is a separate plugin. Nothing in this plugin stops working or expires.

= What the plugin does not support =

* Rates from your own carrier agreements. If you have negotiated rates with a carrier, book those shipments in Sendify directly.
* Additional services such as notification or tailgate lift. Book shipments needing those in Sendify directly.
* Cancelling a booked shipment: cancel it in Sendify. The plugin notices the cancellation and shows it on the order.
* ABD documents and sales invoices are not created or uploaded.
* Printing through PrintNode: labels are printed as PDF from the browser.
* Shipping rules in Sendify: the plugin uses its own rule for the suggested option.

== Installation ==

1. Install and activate WooCommerce.
2. In WordPress, go to Plugins → Add New Plugin, search for North Shipping Manager and click Install Now, then Activate. (Or upload the ZIP under Plugins → Add New Plugin → Upload Plugin.)
3. The setup wizard opens. Paste your API key from Sendify (Settings → API in Sendify) and follow the steps. Start with a key from Sendify's test environment (Sandbox) if you want to try booking without charges.

The full user guide is at [northcreativecollective.se/en/docs/](https://northcreativecollective.se/en/docs/).

== Frequently Asked Questions ==

= Do I need a Sendify account? =

Yes. The plugin books through your own Sendify account with your own API key. Create the key in Sendify under Settings → API.

= Does it work with other shipping services? =

Sendify is the only shipping connection today. More connections are planned.

= Is anything booked or charged while I try the plugin? =

Not in Sendify's test environment (Sandbox). With a key from the live environment the plugin starts as "Production (read-only)": it checks the connection and reads service points and tracking, but creates no drafts and books nothing until you switch on live booking. Rates are shown once live booking is on, because Sendify prices a shipment only from a draft.

= Do my products need weights? =

No. Each package template has a weight that is used when the products have none. If your products do have weights, their total weight and the packaging weight are used.

= Why does an order say the recipient has no phone number? =

Sendify's live environment requires the recipient's phone. Add it to the order and find shipping again. To avoid it, make the phone field required in your checkout.

= What does the customer see as sender? =

The sender you choose. It is printed on the shipping label and shown in the tracking. A pickup place, such as a warehouse, is never printed on the label.

= I copied my shop to a staging site. Why is live booking paused there? =

The plugin remembers the shop's address. On a copy at another address, or on a typical staging address connected to Sendify's live environment, it pauses live booking, tracking and customer emails so that the copy cannot book or email your customers. The live shop is not affected.

= Can I cancel a booking from WordPress? =

No, cancel booked shipments in Sendify. The plugin notices the cancellation and shows it on the order. Unbooked drafts are removed by the plugin when an order is cancelled.

= What do Plus and Pro add? =

Plus adds the package template picked by weight, Prepare automatically, Ship again, your own choice of service point, bulk booking and label printing, customs invoices, return labels, more email templates, your own tracking page and review requests. Pro adds booking rules and advanced shipping rules, service points in the checkout, secret pickup places, your own HS codes and your own template for each email, and includes North Return Manager Pro and North Packing Slips & Invoices Pro. They come as a separate add-on from northcreativecollective.se. This plugin works on its own.

= Which languages are included? =

English and Swedish.

== Screenshots ==

1. The order list: package, shipping status and the next step for every order, with quick buttons.
2. Find shipping on the order: live rates from Sendify with a suggested option.
3. A booked order: the label and documents as PDF, and the tracking events.
4. Choose how labels are printed: on a label printer, on your own paper size, one per A4 or several per A4.
5. The setup wizard: the sender printed on the label, the pickup place and the return address.
6. Package templates with sizes and weights.
7. Customer emails with your logo, colours and texts, and a live preview.
8. The health check shows what is missing and where to fix it.

== External services ==

**Sendify (https://www.sendify.com/)**
North Shipping Manager integrates with Sendify, a shipping service run by Sendify AB. The plugin uses the Sendify API (https://app.sendify.se/external/v1, and the Sandbox at https://app.dev.sendify.se/external/v1 for testing) with the shop's own API key. It sends what a shipment needs: sender, pickup and receiver address and contact details, package sizes and weights, the order reference and, for shipments outside the EU, customs information. It fetches rates, bookings, labels and other shipping documents, tracking and the shop's favourite addresses and packages. Every request also carries the plugin's name and version and the shop's address (home URL) in the User-Agent header, so that Sendify can see which shop and integration a call comes from. Requests are made:
* from the WordPress admin, when you paste an API key (the key is checked against Sendify's live environment and the Sandbox to find which one it belongs to), and when you find shipping, book, print or open a shipment;
* by the scheduled tracking update (active shipments, every two hours);
* by the draft clean-up: when an order is cancelled, refunded, fails, is moved to the trash or deleted, its unbooked draft is deleted in Sendify (booked shipments are never cancelled);
* with the add-on North Shipping Manager Plus & Pro: by Prepare automatically, in the background when an order is paid (rates and an unbooked draft, nothing is booked);
* with the add-on's Pro tier: by the service point choice in the checkout, through the store's own server – only the country, the postcode and the carrier are sent, never the API key or other customer details.

If you switch on webhooks, Sendify also sends booking and tracking events to the shop's own address (/wp-json/north-shipping-manager/v1/webhook), signed with a secret only the shop and Sendify know.

Sendify's terms of service: https://www.sendify.com/en-se/terms-of-service/ (in Swedish: https://www.sendify.com/sv-se/juridiskt/anvandaravtal/)
Sendify's privacy policy: https://www.sendify.com/sv-se/juridiskt/personuppgiftspolicy/

**Carriers' tracking pages**
Customer emails link to the carrier's own tracking page (for example PostNord, DHL, DSV, Bring, UPS, FedEx) with the tracking number. Where a carrier's page cannot take the number in the link, the email shows the number to enter there. Nothing is sent to the carrier by the plugin.

== Third-party code ==

* pdf.js 5.7.284 by the Mozilla Foundation (Apache License 2.0), unmodified legacy build in assets/vendor/pdfjs/. Source: https://github.com/mozilla/pdf.js (release v5.7.284), package pdfjs-dist on npm. Used to print label PDFs on the chosen paper size.
* Lucide icons (ISC). Source: https://github.com/lucide-icons/lucide
* Tabler Icons "package", redrawn as the admin menu icon (MIT). Source: https://github.com/tabler/tabler-icons

== Changelog ==

= 0.1.1 =
First version on WordPress.org.

* Live rates from Sendify on the order, with a suggested option by your own rule.
* Booking with price confirmation, so nothing is booked twice.
* Labels in A4, on a label printer or on your own paper size, and shipping documents as PDF.
* The order list shows package, shipping status and next step for every order.
* Package templates with a weight, and sender and pickup places kept apart.
* The nearest service point is chosen automatically, and you choose the pickup day.
* Automatic tracking, and customer emails when the shipping is booked, on its way and delivered.
* Setup wizard, health check and a built-in help guide.
* Live booking is a separate switch, and copies of the shop (staging) pause themselves.
* Unlink a shipment that was cancelled or deleted in Sendify, and find shipping again.
* English and Swedish.
* Works on large stores without HPOS (orders stored as posts): tracking and the shipment lists only look at orders that can have a shipment, one at a time, so the background update no longer runs out of memory. A tracking update that stops is logged and retried later instead of every few minutes.
* For stores that tested a pre-release: shipments, tracking and email settings are moved to the plugin's new internal names automatically the first time the plugin runs. Nothing needs to be done.

== Upgrade Notice ==

= 0.1.1 =
First version on WordPress.org. If you tested a pre-release, update North Shipping Manager Plus & Pro at the same time.
