=== Correo Argentino for WooCommerce ===
Contributors: gdicorreo
Tags: woocommerce, shipping, logistics, argentina, correo argentino
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 3.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Allow your customers to ship orders via Correo Argentino directly from your WooCommerce store.

== Description ==

This plugin integrates Correo Argentino services with WooCommerce. It provides:
* Automatic shipping rates at checkout.
* Home delivery and branch/pickup selection.
* Free–shipping threshold configuration.
* Integration with MiCorreo and Paq.AR.
* Label handling and tracking.

== External Services ==

This plugin connects to Correo Argentino’s logistics APIs to quote rates, create/cancel shipments, generate/print labels, and track parcels.

**Services used**
- PAQ.AR API (Production): https://api.correoargentino.com.ar/paqar/v1  
- MiCorreo API (Production): https://api.correoargentino.com.ar/micorreo/v1  
- PAQ.AR Sandbox (Testing): https://apitest.correoargentino.com.ar/paqar/api

**What data is sent and when**
- **Checkout (rate quote):** origin/destination postcode and province/state, cart/package weight and dimensions, chosen service.  
- **Create/submit shipment & label:** order ID, recipient full name, phone/email, shipping address, selected branch/pickup (if applicable), package weight/dimensions/declared value, store identifier.  
- **Cancel shipment:** shipment tracking/reference.  
- **Tracking:** shipment tracking/reference.

**Why this data is sent**
- To obtain rates, generate labels, route parcels, and provide tracking through Correo Argentino.

**Authentication & conditions**
- Requires API credentials issued by Correo Argentino. A sandbox (testing) environment can be enabled in the plugin settings.

**User data & privacy**
- Personal data is transmitted to the carrier strictly to provide the shipping service. No payment/card data is sent by this plugin.  
- Correo Argentino policies:  
  - Privacy / Terms (ES): https://www.correoargentino.com.ar/terminos-y-condiciones-generales-de-privacidad  
  - MiCorreo Terms (ES): https://www.correoargentino.com.ar/MiCorreo/public/terminosycondiciones

**Opt-out**
- If you remove your API credentials or disable the integration, no requests will be made (shipping features from this plugin will be unavailable).

== Installation ==

1. Upload the plugin to `/wp-content/plugins/`.
2. Activate it through the “Plugins” menu in WordPress.
3. Configure your credentials and settings at **WooCommerce → Settings → Shipping → Correo Argentino**.

== Frequently Asked Questions ==

= Do I need a Correo Argentino account? =
Yes. You need an active contract/account to use the integration API.

= Does it support free shipping? =
Yes. You can set a minimum order amount to enable free shipping automatically.

== Changelog ==

= 3.0.7 =
* Security and sanitization improvements.
* Postcode validation in Checkout and My Account.
* Replaced remote assets with local files and removed inline scripts/styles (uses wp_enqueue_*).
* Documented external services (endpoints, data flow, policies).

== Upgrade Notice ==

= 3.0.7 =
Highly recommended to update for WordPress 6.9 compatibility and security improvements.

== Screenshots ==

1. Checkout with branch/pickup selection.
2. MiCorreo credentials screen.
3. Free-shipping configuration.

== License ==

This plugin is free software released under the GPLv2 (or later).

== Third-party Assets ==
This plugin ships minified vendor files together with their human-readable sources:

- **jQuery Validation Plugin 1.21.0** (MIT) — https://github.com/jquery-validation/jquery-validation  
  Included in this plugin:  
  `assets/js/jquery.validate.min.js` **and** `assets/js/jquery.validate.js`  
  `assets/js/additional-methods.min.js` **and** `assets/js/additional-methods.js`

- **jQuery Mask Plugin 1.14.16** (MIT) — https://github.com/igorescobar/jQuery-Mask-Plugin  
  Included in this plugin:  
  `js/jquery.mask.min.js` **and** `js/jquery.mask.js`

- **Select2 4.0.13** (MIT) — https://github.com/select2/select2  
  Included in this plugin:  
  `assets/vendor/select2/4.0.13/dist/js/select2.full.min.js` **and** `assets/vendor/select2/4.0.13/dist/js/select2.full.js`  
  `assets/vendor/select2/4.0.13/dist/css/select2.min.css` **and** `assets/vendor/select2/4.0.13/dist/css/select2.css`

No CDN files are required at runtime. Minified files are kept for performance; sources are provided for review as required by WP.org guidelines.

== Source Code / Build ==

The plugin does not require a build step to run. If you want to update vendor libraries:

1. Download vendor files from their official repositories/releases (see links above) or via npm and place them under `assets/` as shown.  
2. Keep **both** minified and non-minified files in the distributed ZIP.  
3. Do not include development folders in the ZIP (e.g., `node_modules/`, `.vscode/`). A `.distignore` file is provided to exclude them.

If a public repository is used to host this plugin’s source (recommended), it will be listed here:  
https://www.correoargentino.com.ar/MiCorreo/public/mi-correo
