=== Sextant Export & Import ===
Contributors: astraiosplugins
Tags: woocommerce, export, import, excel, xlsx
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: trunk
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
WC requires at least: 5.0
WC tested up to: 10.5

Export and import WooCommerce products via Excel. Edit your products in Excel, then import changes straight back. Free, no account required.

== Description ==

Navigate your WooCommerce data with the precision of a master mariner. **Sextant Export & Import** is the essential navigational tool for store owners who need to move order data, products, and customer records between vessels without losing their way.

Just as a traditional sextant allows a sailor to find their exact position by the stars, this plugin gives you total orientation over your store's data. Whether you are migrating to a new "port" (website) or simply need to keep your "logbooks" (spreadsheets) updated, Sextant ensures a smooth voyage.

= Key Features for a Smooth Voyage =
* **Precise Navigation:** Export exactly what you need with granular filters—no more drifting in a sea of unnecessary data.
* **Steady Course:** Import data with confidence. Our mapping system ensures every piece of information lands exactly where it should.
* **Lightweight Vessel:** Built for speed and efficiency, ensuring your server's performance stays on an even keel.
* **Clear Horizon:** A clean, intuitive interface that doesn't require a captain's license to operate.

Stop guessing your position and start exporting with professional accuracy. Set your course with Sextant Export & Import today.

**Export**

* All products exported to a clean .xlsx file — opens in Excel, LibreOffice, Google Sheets
* Simple and variable products supported — variants go on a separate sheet, linked to their parent
* Choose which fields to include: ID, SKU, name, prices, stock, categories, tags, images, permalink
* Filter by product type, status, or category before exporting
* Product count validation — compares raw database count against WooCommerce API count and warns if they differ

**Import**

* Upload the exported .xlsx file (or any file matching its column structure) to update products in bulk
* Choose which fields to import — only the columns you select will be updated
* Supported fields: SKU, product name, status, short description, full description, regular price, sale price, stock status, stock quantity, weight, categories, tags, and permalink (slug)
* Preview changes before committing — see exactly what will be updated
* Products are matched by WooCommerce ID — safe and unambiguous

**Built for reliability**

* Three-layer safety system — disengages automatically if something goes wrong, protecting your store from downtime
* Built-in error reporting — email a diagnostic report to the developer directly from your admin panel
* No Composer dependencies, no external libraries, no bloat

**Part of the Sextant platform by Astraios.no**
*Know your position. Chart your course.*

== Installation ==

1. Upload the plugin to `/wp-content/plugins/sextant-export`, or install through the WordPress plugins screen.
2. Activate the plugin. WooCommerce must be installed and active.
3. Go to **WooCommerce → Sextant Export** to export your products.
4. Edit the downloaded .xlsx file in Excel, LibreOffice, or Google Sheets.
5. Go to **WooCommerce → Sextant Import** to upload the edited file and apply your changes.

== Frequently Asked Questions ==

= Does this work without WooCommerce? =
No. WooCommerce must be active. The plugin deactivates itself automatically if WooCommerce is not detected.

= What PHP version do I need? =
PHP 8.0 or higher. The plugin checks this at activation.

= My server doesn't have ZipArchive. What do I do? =
ZipArchive is a standard PHP extension required to generate and read .xlsx files. Contact your hosting provider and ask them to enable the `zip` PHP extension.

= The product count is lower than expected. Why? =
Another plugin may be filtering product visibility. The export page shows both the raw database count and the WooCommerce API count — a warning appears if they differ.

= Which fields can I update on import? =
SKU, product name, status, short description, full description, regular price, sale price, stock status, stock quantity, weight, categories, tags, and permalink. You choose which fields to apply — the rest are left untouched.

= Can I import a file I didn't export with this plugin? =
The import requires at minimum an "ID" column matching WooCommerce product IDs, plus at least one supported field column. Files exported by Sextant Export already have the correct structure.

= Why does the plugin deactivate itself on errors? =
A plugin that throws unexpected errors can cause a white screen or critical error on your storefront. Self-deactivation keeps your store running.

== Screenshots ==

1. The export settings page — choose product type, status, category filter, and fields.
2. Product count display with mismatch warning.
3. The downloaded .xlsx file opened in Excel.
4. The import page — upload your edited file, preview changes, and apply.

== Changelog ==

= 2.0.0 =
* Added: Built-in import — upload an edited .xlsx file and update products directly from the admin panel
* Added: Field selection on import — choose exactly which columns to apply
* Added: Import preview — review all changes before committing
* Added: Support for importing SKU, name, status, descriptions, prices, stock, weight, categories, tags, and permalink

= 1.2.0 =
* Rebranded as Sextant Export — part of the Sextant platform by Astraios.no
* Added: Three-layer safety system with automatic self-deactivation
* Added: Built-in error log and email reporting
* Added: Product count validation with mismatch warning
* Fixed: HTML entities in category and tag names
* Fixed: Export via admin-post.php — prevents headers-already-sent issues
* Improved: Full i18n support

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 2.0.0 =
Major update: built-in import is now included. No separate plugin needed. Upgrade recommended.
