=== Hedwig Envíos for WooCommerce ===
Contributors: fenrisdev
Tags: shipping, woocommerce, shipping-rates, shipping-labels, mexico
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.4.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Quote and create DHL, FedEx, Paquete Express and Estafeta shipping labels for Mexico from your WooCommerce orders.

== Description ==

Hedwig Envíos connects your WooCommerce store to the Hedwig service so you can
quote shipping rates and create shipping labels for Mexico without leaving the
WordPress dashboard.

= What it does =

* **Live rates at checkout.** A shipping method that fetches real prices from
  DHL, FedEx, Paquete Express and Estafeta based on the customer's postcode and
  the order's dimensions.
* **Labels from the order screen.** Confirm weight and dimensions, pick a rate
  and create the label. The label downloads as a PDF.
* **Standalone quoting.** Quote and create labels without an order.
* **Shipment tracking** inside the order itself, with the history reported by
  the carrier.
* **Label cancellation** with a reason. The balance returns to your Hedwig
  wallet within the service's stated timeframe, not immediately.
* **Pickups**: schedule the carrier to collect the parcel. A pickup is always
  created from an existing label, so it goes to that label's origin address.
* **Wallet, address book and parcel presets** managed from the plugin panel.
* **Support tickets** from the order screen.

= What you need =

* WooCommerce active.
* A Hedwig Envíos account (you can create one from the plugin itself).
* **HTTPS.** The plugin blocks itself if the site has no SSL certificate:
  without TLS, your customers' shipping data would travel in the clear.

= About the cost =

The plugin is free and does not limit any of its features. Creating labels draws
from your Hedwig account wallet, because the carrier charges for each label.
Unverified accounts have a trial limit imposed by the service — not by the
plugin — until identity verification is completed.

== External services ==

This plugin relies on one external service: **Hedwig Envíos**. Without it the
plugin cannot quote or create labels, because that service is what talks to the
carriers.

= When it connects and what it sends =

**When quoting at checkout**, each rate calculation sends only:

* origin and destination postcodes,
* parcel weight and dimensions,
* declared value, if you have insurance enabled.

**No personal data** about your customer is sent at this step.

**When creating a label**, and only then, it sends the data needed to print it:

* recipient name, phone and email,
* full address: street, number, neighbourhood, postcode, city, state and
  delivery notes,
* the same details for the sender, which you enter in the settings,
* contents description and order number.

**When using the panel** it reads your account's balance, labels, addresses and
notifications.

The service also sends automatic notifications to your store when a shipment
changes status, to keep the order up to date.

= Service terms and privacy =

* Service: https://hedwig-envios.fenrisdev.com
* Terms and conditions: https://hedwig-envios.fenrisdev.com/legal/terminos
* Privacy policy: https://hedwig-envios.fenrisdev.com/legal/privacidad

By connecting your store you accept the Hedwig Envíos terms. If you do not want
your customers' data processed by that service, do not install the plugin.

== License ==

The plugin code is GPLv2 or later. The full text is in `LICENSE`.

The typefaces in `assets/fonts/` are third-party work and are **not** covered by
that GPL. Karla and Prata are both distributed under the SIL Open Font License
1.1, which is GPL-compatible. Copyright notices and the licence text are in
`OFL.txt`.

No other third-party code is redistributed: React and the `@wordpress/*`
libraries are taken from WordPress at runtime, not bundled.

== Source code ==

The panel interface is written in TypeScript and ships compiled in
`build/index.js`. **The uncompiled source travels inside this same package**, in
`src/`, together with its full build configuration: `package.json`,
`tsconfig.json`, `webpack.config.js`, `tailwind.config.js` and
`postcss.config.js`.

To rebuild `build/` from source, inside the plugin folder:

`pnpm install && pnpm build`

The build tools are `@wordpress/scripts` and Tailwind CSS, both free software.
Nothing is downloaded or executed during plugin installation: `build/` ships
ready.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it from the WordPress
   dashboard.
2. Activate it from the **Plugins** menu.
3. Go to **Hedwig Envíos** and create your account or connect an existing one.
4. In **Settings**, enter the origin address you ship from, including the
   delivery notes: without them the carriers reject the label.
5. If you want rates at checkout, add the **Hedwig** shipping method to your
   WooCommerce shipping zones.

== Frequently Asked Questions ==

= Do I need a paid account? =

You need a Hedwig Envíos account with balance to create labels, the same as with
any carrier. The plugin itself charges nothing and locks no features.

= Why doesn't the plugin work without HTTPS? =

Because your customers' shipping data would travel unencrypted. The plugin
blocks itself on purpose until the site has an SSL certificate.

= Can I cancel a label I already created? =

Only while the carrier has not picked it up. Once the shipment is moving it
cannot be cancelled. The balance returns to the wallet within the timeframe the
service states when cancelling, not instantly.

= Does the plugin store my customers' data? =

In your own database it stores the tracking number, carrier, status and price
inside the order. Address data is sent to Hedwig to print the label, as detailed
in the external services section.

= Does the plugin hide dashboard notices? =

Only within its own screen, so the interface is not pushed down by other
plugins' notices. Everywhere else in the WordPress dashboard, including the
order screen, it touches nothing.

== Screenshots ==

1. Live rates from DHL, FedEx, Estafeta and Paquete Express inside the
   WooCommerce order, with the cheapest one highlighted.
2. The Hedwig panel on the order screen: quote the shipment or schedule a
   pickup without leaving WooCommerce.
3. Standalone quote — two postal codes and the package are enough, no order
   required.
4. Dashboard with the prepaid wallet balance, account status and recent labels.
5. Volume tiers and the referral programme.
6. Address book, so frequent senders and recipients are one click away.
7. A closer look at the rate list, with delivery estimates for every carrier.

== Changelog ==

= 1.4.6 =
* The plugin now tells the Hedwig service which version it is running, so the
  service can let you know when a newer one is out. Only the plugin name,
  version and store address are sent; nothing about you or your customers.
* Fixed an invalid attribute in the block checkout field registration. It made
  WooCommerce discard the whole attribute set for the delivery notes field and
  log a notice on every page load.
* New "En camino" order status. Creating a shipping label for an order moves it
  there automatically, and it moves on to Completed by itself when the carrier
  reports the parcel as delivered.
* New customer email, sent when the label is created. It says the order is ready
  to ship — not that it is already travelling — with the carrier, the tracking
  number and a link to the order. It can be edited or turned off under
  WooCommerce → Settings → Emails like any other store email.
* Customers now see the tracking of their own parcel at the top of their order,
  with the carrier, the tracking number, the estimated delivery date and the
  events reported by the carrier. Orders without a label show nothing at all.
* New "Nivel y referidos" screen. It shows which price level your volume has
  earned you, how many labels you still need to move up, and your invite code:
  when someone signs up with it, verifies their account, tops up and ships their
  first parcel, both of you get wallet credit.
* The sign-up form now takes an optional invite code.
* Fixed a fatal error in the webhook handler: a bad class reference broke every
  incoming event from the service.

= 1.3.5 =
* The plugin now talks to the production service at hedwig-envios.fenrisdev.com
  instead of the staging one. The Terms and Privacy links in the footer follow
  the same base, so they point to production too.
* Headings now use Prata, a SIL Open Font License typeface, instead of the
  previous commercial one. Everything shipped in this package is now
  GPL-compatible.

= 1.3.4 =
* The Verification tab now shows a status card: whether the request is under
  review or was rejected, the reason for the rejection, how many times you have
  applied and the relevant dates.
* Fixed the status never being read. The tab looked for it in the wrong place
  in the service response, so it always showed the same generic notice even
  with a request in progress.

= 1.3.3 =
* The footer link now covers the whole "Desarrollado por Fenris" phrase instead
  of the single word.
* Verification notices get their own icon in the bell and open the Verification
  tab when clicked.

= 1.3.2 =
* Every screen now ends with a footer that links to the Terms and Conditions
  and the Privacy Notice and credits Fenris as the developer. It is shown on
  the sign-in screen too.
* The menu icon is no longer dimmed: WordPress fades image icons to 60% so they
  do not stand out over the dashicons, which left the mark looking washed out.

= 1.3.1 =
* The label download messages now use esc_html__() instead of __(): wp_die()
  prints its message, so the translated string has to be escaped too.

= 1.3.0 =
* The plugin is now translatable: 353 user-facing strings are wrapped in the
  translation functions, both in PHP and in the React panel.
* Every PHP file now refuses to run when WordPress is not loaded, so a direct
  request to a plugin file can no longer surface a fatal error.

= 1.2.0 =
* Renamed to "Hedwig Envíos for WooCommerce" to meet the WordPress.org
  trademark naming rules.
* The readme is now in English, as the directory requires.
* Documented the three static-analysis exceptions: the binary PDF label stream,
  the checkout field (WooCommerce verifies the nonce upstream and the value is
  sanitised on the next line), and the transient cleanup on uninstall.

= 1.1.3 =
* The WordPress menu icon and the logo are no longer stuck in the browser cache:
  their URLs now carry the plugin version. The old mark kept showing even though
  the file on disk was already the new one.

= 1.1.2 =
* The track, view details and cancel buttons on the order screen now use a solid
  fill: they were transparent with a faint border and got lost on the ticket.
* Error messages and status pills are no longer translucent tints either, which
  practically disappeared on the light ticket.
* In dark mode the "rates will appear here" placeholder is visible again; it had
  light text over a light veil.

= 1.1.1 =
* Green badges (Verified, Delivered) now use white text over a darkened green,
  which is where white is actually legible.
* The label ticket now uses the brand teal.
* Notifications now take you where the thing they announce is: a support reply
  opens that ticket.
* Fixed the notifications panel, which ran off screen on mobile.
* Fixed the "Show" selector arrow, which overlapped the number.
* **My Hedwig account** now shows your name and email; they arrived empty.
* In the quoting screen, addresses marked "origin and destination" show up in
  both pickers again.
* Pickups can only be scheduled for newly created labels; shipments already in
  transit or delivered are no longer offered.

= 1.1.0 =
* New **Pickups** section. A pickup is scheduled from a label: the carrier goes
  to that label's origin address, so there is no address or carrier to capture.
  You only choose day, time window, piece count and the largest parcel's size.
* Labels, addresses, parcels and pickups now **paginate** (10, 20, 50 or 100 per
  page) and have a **search box** that ignores case and accents.
* **My Hedwig account** in Settings: edit your name and change your password.
  The email is shown but not editable, because it is the sign-in credential.
* Addresses and parcels redesigned.
* Opening a support ticket now returns an automatic notice with the support
  hours, making it clear this is not a live chat.
* Tabs now indicate that they scroll on mobile.
* Fixed the notifications button, invisible in light mode.
* Fixed the order panel colours and the label button, which overflowed.
* Server errors are no longer shown raw.

= 1.0.2 =
* Colour hierarchy properly applied: teal is the primary colour across the
  interface, green the secondary and coral the accent.
* Neutrals are tinted toward teal instead of being flat greys.
* Black surfaces removed: the header becomes a light surface — where the main
  full-colour logo lives — and dark panels become deep teal.

= 1.0.1 =
* New brand identity: teal, green and coral palette, new logo and the Elegancy
  typeface for headings. Karla stays for body text and data.
* The previous identity (ochre accent and Playfair Display) is retired.

= 0.1.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.5 =
Connects to the production service instead of the staging one. Headings change
typeface. Reconnect your account after updating.

= 1.3.4 =
The Verification tab now shows the real state of your request, the rejection
reason and your number of attempts.

= 1.3.3 =
Small footer and notification-icon polish. No change in behaviour.

= 1.3.2 =
Adds a footer with the legal documents on every screen and stops the menu icon
from being dimmed. No change in behaviour.

= 1.3.1 =
Escaping fix in the label download messages. No change in behaviour.

= 1.3.0 =
The interface can now be translated. No change in behaviour.

= 1.2.0 =
The plugin folder name changed. Remove the old plugin before installing this
one, and reconnect your Hedwig account afterwards.

= 1.1.3 =
Fixes the menu icon, which kept showing the previous brand due to browser cache.

= 1.1.2 =
Improves legibility on the order screen and fixes dark mode in the quoting
screen.

= 1.1.1 =
Colour corrections, notifications that now navigate, and pickups can no longer
be scheduled for shipments already on their way.

= 1.1.0 =
Adds Pickups, pagination and search boxes. If you had many addresses or labels,
they now load page by page instead of all at once.

= 1.0.2 =
Corrects how the identity is applied: primary colour visible across the
interface and no black surfaces.

= 1.0.1 =
Completely changes the panel's visual identity. If you still see the previous
colours after updating, force a cache reload (Ctrl+F5).

= 0.1.0 =
Initial release.
