=== WatShop Reseller ===
Contributors: watshop
Tags: woocommerce, reseller, digital products, api, dropshipping
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Resell the WatShop digital catalog on your own WooCommerce store with automatic import, ordering and credential delivery.

== Description ==

WatShop Reseller connects your WooCommerce store to the WatShop reseller API (https://mskey.watshop.in):

* **Catalog import** — one click imports the whole WatShop catalog as virtual WooCommerce products (name, description, category, image, stock status). Products are matched by SKU, so re-importing is always safe.
* **Your margin** — set a price margin percentage; shop prices are calculated as WatShop price (INR) × (1 + margin / 100).
* **Auto-sync** — an hourly background task keeps prices and stock status in sync with WatShop (can be turned off).
* **Automatic fulfilment** — when a customer pays, the plugin places the matching order with WatShop using the customer's billing email. If credentials are delivered instantly they are saved to the order and included in the completion email; otherwise a 5-minute background task polls WatShop and emails the customer as soon as the order completes.
* **Failure safety** — if an order cannot be placed (for example insufficient wallet balance), the order gets a note, the site admin gets an email, and a Retry button appears in the WatShop box on the order screen.

Requires an active WatShop reseller account and API key. All prices from the API are in INR (₹).

== Installation ==

1. Make sure WooCommerce is installed and active.
2. Upload the `watshop-reseller` folder to `/wp-content/plugins/`, or upload the zip via Plugins → Add New → Upload Plugin.
3. Activate **WatShop Reseller** through the Plugins screen.
4. Go to **Settings → WatShop Reseller**:
   * enter your API key (from your WatShop reseller dashboard),
   * set your price margin,
   * click **Test Connection** to verify your account name and wallet balance.
5. Click **Import catalog now** to pull the catalog into WooCommerce.
6. Keep your WatShop wallet topped up — orders are debited from it automatically.

== Frequently Asked Questions ==

= What happens when my wallet balance is too low? =

The WooCommerce order stays in place, an order note is added, and the site admin receives an email. After topping up, use the **Retry order** button in the WatShop box on the order edit screen.

= Does uninstalling delete my products? =

No. Uninstalling removes the plugin settings and scheduled tasks but leaves all imported WooCommerce products untouched.

= What currency are prices in? =

The WatShop API returns prices in INR (₹). Your shop price is the INR price plus your configured margin.

== Changelog ==

= 1.0.0 =
* Initial release: catalog import, hourly sync, automatic order placement, credential delivery, retry handling.
