=== IGERSLIKE for WooCommerce ===
Contributors: igerslike
Tags: woocommerce, social media, instagram, tiktok, orders
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 8.1
Requires Plugins: woocommerce
WC requires at least: 8.2
WC tested up to: 10.7
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell IGERSLIKE services through WooCommerce and submit paid line items to the IGERSLIKE v2 API.

== Description ==

IGERSLIKE for WooCommerce maps WooCommerce products to IGERSLIKE v2 products. Shoppers enter the target link and quantity on classic WooCommerce product pages, then the plugin submits paid line items to IGERSLIKE when the configured WooCommerce order status is reached.

The plugin supports WooCommerce HPOS through WooCommerce CRUD methods. Cart and Checkout Blocks are not supported in version 1.0.0; use classic WooCommerce product, cart, and checkout templates.

== Requirements ==

* WordPress 6.5 or newer.
* PHP 8.1 or newer.
* WooCommerce 8.2 or newer.
* Classic WooCommerce cart and checkout templates.
* An IGERSLIKE v2 API key.

== Installation ==

1. Upload `igerslike-for-woocommerce.zip` from Plugins > Add New > Upload Plugin.
2. Activate WooCommerce.
3. Activate IGERSLIKE for WooCommerce.
4. Open WooCommerce > IGERSLIKE.
5. Generate an API key at https://igerslike.com/dashboard/settings.
6. Enter the IGERSLIKE API key.
7. Choose the WooCommerce order status that triggers IGERSLIKE submissions.
8. Refresh IGERSLIKE products.

== Setup ==

1. Edit a WooCommerce product.
2. In Product data > IGERSLIKE, choose the service type.
3. For one-off orders, choose the IGERSLIKE product and enter a fixed quantity or leave it blank so shoppers enter a quantity.
4. For Instagram or TikTok automatic orders, map the included IGERSLIKE products and amounts.
5. Save the WooCommerce product.
6. Place a test order through the classic product and checkout templates.
7. Move the order to the configured trigger status.
8. Confirm the line item stores the IGERSLIKE remote order ID and status.

== FAQ ==

= Does this support Cart and Checkout Blocks? =

No. Version 1.0.0 supports classic WooCommerce product, cart, and checkout templates only.

= Where is the API key stored? =

The API key is stored in a WordPress option with autoload disabled. Defining the `IGERSLIKE_API_KEY` constant overrides the stored value.

= How does retry safety work? =

Each WooCommerce order item uses a stable merchant ID built from the site UUID, WooCommerce order ID, and line item ID. Repeated submissions use the same merchant ID so IGERSLIKE v2 can return the existing order instead of charging twice.

= What happens when the API is temporarily unavailable? =

Transient HTTP and network failures are retried through WooCommerce Action Scheduler. Permanent API errors are stored as the line item reason for merchant diagnostics.

== Changelog ==

= 1.0.0 =

* Initial v2-only WooCommerce connector.
* Product mapping, shopper link and quantity fields, order submission, retry handling, and status sync.

== Upgrade Notice ==

= 1.0.0 =

Initial release. This plugin does not migrate settings or data from the old IGERSLIKE WordPress plugin.
