=== Shipping Rates Spreadsheet ===
Contributors: andrzejmierzanowski
Donate link: https://devstudio8848.com/shipping-rates-spreadsheet/
Tags: woocommerce, shipping, shipping rates, checkout, shipping zones
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
WC requires at least: 5.0
WC tested up to: 11.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Country-based shipping prices in a matrix, applied to WooCommerce zone methods. Pro adds extra currencies, regions, and CSV/XLSX import/export.

== Description ==

Shipping Rates Spreadsheet stores a country (and, in Pro, region and currency) price table on each WooCommerce shipping method instance and applies those prices at checkout.

Use the plugin’s own **Shipping Rates Spreadsheet** method in a shipping zone, or attach the same matrix to existing methods (Flat Rate, local pickup, carrier plugins, and similar).

= Free =

* Spreadsheet-style matrix in the method instance settings
* One price column: the store currency
* Country-level destinations
* Optional built-in Shipping Rates Spreadsheet zone method (can be hidden)
* Apply the matrix to other zone methods, per instance or in bulk
* Cost logic: override the method price, add the matrix amount, or take the higher of the two
* Destinations listed without a price are blocked (the rate is removed)
* Debug logs under WooCommerce → Status → Logs
* Cleanup tools for orphaned matrix data
* Optional removal of matrix data when the plugin is deleted
* Polish and German translations
* Compatible with WooCommerce High-Performance Order Storage (HPOS)

= Pro =

* Additional currency columns
* State/region rows (for example US:CA) with country-level fallback
* Import and export as CSV or XLSX

Matrix data lives in WooCommerce shipping method instance settings. The plugin does not create custom database tables.

Product page: [https://devstudio8848.com/shipping-rates-spreadsheet/](https://devstudio8848.com/shipping-rates-spreadsheet/)

= Third-party libraries =

The matrix editor in the admin uses two bundled MIT-licensed libraries, shipped unmodified:

* Jspreadsheet CE 5.0.0 — [project](https://bossanova.uk/jspreadsheet), [source](https://github.com/jspreadsheet/ce/tree/b3837b1a09c4b81e92aff21222afff2769203af5/src)
* jSuites 6.1.2 — [project](https://jsuites.net), [source](https://github.com/jsuites/jsuites/tree/a7433883e9e4c6de2070e43171ea0c37c29f0185/src)

Versions, licenses, and links to the non-minified sources are also listed in `assets/vendor/README.md`.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/devstudio8848-shipping-rates-spreadsheet/` or install it from the WordPress plugin directory.
2. Activate **Shipping Rates Spreadsheet** through the Plugins screen.
3. Open WooCommerce → Settings → Shipping → Shipping Rates Spreadsheet.
4. Enable the matrix on the built-in method and/or on existing zone methods, then edit those methods to fill the table.

== Screenshots ==

1. Global matrix settings and cost calculation options.
2. Shipping Rates Spreadsheet as a zone shipping method.
3. Country-based price matrix in method settings.
4. Matrix applied to an existing Flat Rate method.
5. Pro matrix with regions, multiple currencies, and import/export.

== Frequently Asked Questions ==

= Does this replace my existing shipping methods? =

No. You can keep Flat Rate and other carriers and only apply the matrix to selected instances. You can also hide the plugin’s own method and use assignment only.

= What happens if a country is not in the matrix? =

For the built-in Shipping Rates Spreadsheet method, the **Default cost** is used. If that field is empty, the method is hidden. For assigned third-party methods, the rate is removed from checkout.

= What happens if the country is in the matrix but the cell is empty? =

That destination is blocked for the active currency: the rate is removed.

= Can I charge different prices per state or region? =

Yes, in Pro. Use location keys such as `US:CA`. If there is no region row, the country row is used.

= Can I set prices in several currencies? =

The free version uses the WooCommerce store currency only. Pro adds extra columns.

= Where is the data stored? =

In each method’s instance option (`woocommerce_{method_id}_{instance_id}_settings`), under the `ds8848_srs_matrix` key. Nothing is written to custom tables.

= How do I remove plugin data? =

Enable **Remove data on uninstall** in the Shipping Rates Spreadsheet settings, then delete the plugin. You can also run the on-screen orphaned-data cleanup without uninstalling.

== Changelog ==

= 1.0.0 =
* Initial release: country matrix, apply to zone methods, cost logic, HPOS compatibility.
* Pro: multi-currency, regions, CSV/XLSX import and export.

== Upgrade Notice ==

= 1.0.0 =
First public release.
