=== KAYANO Inventory Sync ===
Contributors: kayanofish
Tags: woocommerce, inventory, stock sync, warehouse, multi-channel
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Two-way real-time inventory, product, and order synchronization between WooCommerce and the KAYANO Cloud Inventory Management System.

== Description ==

**KAYANO Inventory Sync** connects WooCommerce with the **KAYANO Cloud Inventory Management System** (`https://kayano-ims.com`), providing real-time synchronization for stock, products, and orders across multiple channels.

### Key Features

* **Real-Time Stock Synchronization**: Automatically updates WooCommerce stock levels when inventory changes in KAYANO.
* **Automated Order Sync (Webhook)**: Notifies KAYANO upon new or updated WooCommerce orders to adjust inventory.
* **Bulk Product & Image Sync**: Push product data, prices, SKUs, and images from KAYANO to WooCommerce.
* **Multi-Warehouse & Location Tracking**: Track warehouse locations while maintaining accurate online stock.
* **Free Plan Available**: Free with a KAYANO account (`$0/month`) or Pro plan.

### External Services

Connects to the **KAYANO Cloud Inventory Management System** (`https://kayano-ims.com`) for synchronization.

* **Service Name**: KAYANO Cloud Inventory Management System
* **Service Website**: https://kayano-ims.com
* **API Endpoint**: https://kayano-ims.com/api/wp-sync/
* **Data Transmitted**: Site URL, API token, order details (ID, status, SKU, quantity), and product data (name, SKU, price, stock, image URLs).
* **Terms of Service**: https://kayano-ims.com/terms/
* **Privacy Policy**: https://kayano-ims.com/privacy/

== Installation ==

1. Ensure **WooCommerce** is installed and activated.
2. Upload `kayano-inventory-sync` to `/wp-content/plugins/` or install via **Plugins > Add New**.
3. Activate the plugin in WordPress.
4. Go to **KAYANO IMS** in the sidebar.
5. Enter your Server URL (`https://kayano-ims.com`) and API Token, then click **Save Changes**.
6. Click **Test Connection** and paste your WordPress API Base URL into your KAYANO dashboard.

== Screenshots ==

1. KAYANO Cloud Dashboard displaying overall inventory metrics, warehouse stock summary, and real-time sync status.
2. Stock management list showing product SKUs, warehouse locations, and real-time inventory quantities.
3. Barcode and QR code label printing interface for warehouse shelf and product labeling.
4. Multi-channel CSV bulk import/export and Google Shopping XML feed integration settings.
5. WordPress (WooCommerce) integration settings screen for configuring real-time inventory and order synchronization.
6. Amazon SP-API synchronization settings for automated stock and order management.
7. eBay integration settings for multi-channel inventory and listing synchronization.
8. Shopify and Shopify POS integration settings for unified online and physical store stock tracking.
9. WordPress plugin settings screen in the WP admin dashboard for configuring the API token, connection test, and real-time order sync.

== Frequently Asked Questions ==

= Do I need a KAYANO account to use this plugin? =

Yes. This plugin acts as a bridge between your WooCommerce store and your KAYANO Cloud Inventory Management System account. You can sign up for a Free plan ($0/month) or a Pro plan at https://kayano-ims.com.

= Is this plugin free to use? =

Yes, the WordPress plugin itself is completely free and licensed under GPLv2 or later. On the KAYANO cloud platform, a Free plan is available for basic inventory management, and a Pro plan is available for unlimited items, multi-warehouse management, and bulk CSV/product features.

= Which WooCommerce order statuses trigger inventory deduction? =

When real-time order sync is enabled in the plugin settings, new orders and order status updates (such as Processing or Completed) automatically notify KAYANO to deduct stock based on matching SKUs.

= How are products matched between WooCommerce and KAYANO? =

Products are matched automatically using their **SKU (Stock Keeping Unit)**. Please ensure that your product SKUs in WooCommerce match the corresponding item codes in KAYANO.

= What should I enter in the KAYANO Server URL field? =

Enter only the base domain URL (`https://kayano-ims.com`) without any trailing path such as `/woocommerce`.

== Changelog ==

= 1.0.6 =
* Standardized all user-facing strings to English for WordPress.org GlotPress compatibility.
* Added bundled Japanese translation files (ja) and text domain loader.
* Added plugin screenshots and visual assets.

= 1.0.5 =
* Sanitized decoded Basic authentication username via sanitize_user() before assigning to $_SERVER['PHP_AUTH_USER'].

= 1.0.4 =
* Security: Removed `wp_set_current_user()` and custom token authentication from REST endpoints.
* Security: Switched REST API authentication to standard WordPress Application Passwords and `current_user_can( 'manage_woocommerce' )` capability checks.


= 1.0.3 =
* Removed bundled translation (.po/.mo) files in favor of translate.wordpress.org.
* Improved order webhook and variation SKU resolution compatibility.

= 1.0.1 =
* Improved API authentication header compatibility (`X-Kayano-Token` and `Authorization: Bearer`) for CGI/FastCGI server environments.
* Enhanced connection test diagnostics with detailed HTTP status reporting.
* Added full internationalization (i18n) support (`kayano-inventory-sync` text domain).

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.3 =
Recommended update for WordPress.org translation compatibility and improved variation SKU synchronization.
