=== Importify B2B Supplier Sync ===
Contributors: y0b65
Tags: woocommerce, dropshipping, automation, b2b, supplier
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 5.0
WC tested up to: 8.0
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync and export unlimited products directly to B2B Merchants on WooCommerce and Shopify in real-time.

== Description ==

**Stop chasing inventory updates and emailing messy spreadsheets.**

As a supplier, keeping your merchants updated with accurate stock levels and pricing shouldn't be a full-time job. Manual CSV files lead to delayed updates, frustrated merchants, and costly overselling mistakes.

**Importify B2B Supplier Sync** bridges the gap between you and your retail network. It transforms your WooCommerce store into an automated distribution hub, allowing you to seamlessly sync and export unlimited products directly to Shopify and WooCommerce merchants. Alternatively, publish them straight to the Importify marketplace to reach more merchants and maximize your customer base.

### The Pain Points We Solve:
* **The Spreadsheet Nightmare:** No more exporting, formatting, and emailing daily stock lists. Everything handles itself automatically.
* **Out-of-Stock Disputes:** Prevent merchants from selling items you no longer have. Real-time API syncing ensures your latest inventory and pricing data are always accurate.
* **Limited Merchant Reach:** Easily break into new B2B channels and reach untapped retail audiences by publishing directly to the Importify marketplace.

### Features for Scale:
* **Full Automation:** Seamless integration via JSON API handles the heavy lifting in real time—no CSVs required.
* **Cross-Platform Compatibility:** Export your WooCommerce products directly to merchants operating on Shopify or WooCommerce.
* **Zero Limits:** Enjoy unlimited product exports, unlimited syncs, and connect with unlimited merchants on a single plan built for growth.
* **B2B Direct Distribution:** Put your product catalog directly into your merchants' dashboards for frictionless selling.
* **Marketplace Publishing:** Showcase your products on the Importify marketplace to attract new retail partners.
* **Automated Pricing & Stock Sync:** Updates to your backend flow instantly to your interconnected merchants.
* **Priority Support:** Dedicated customer service to ensure your automated distribution pipeline never stops.

== Installation ==

### Minimum Requirements
1. **PHP:** 7.4 or greater (8.0+ recommended).
2. **Database:** MySQL 5.5.5 or MariaDB 10.1 or greater.
3. **WordPress:** 5.8 or greater.
4. **WooCommerce:** 5.0 or greater.

### Steps
1. Log in to your WordPress dashboard, navigate to **Plugins > Add New**, and search for 'Importify B2B Supplier Sync'.
2. Click **Install Now** and then **Activate** the plugin.
3. Navigate to the new **Importify B2B Supplier Sync** menu item to configure your API settings.

== Screenshots ==

1. **Supplier Dashboard** - View synced products at a glance, ready to be exported to your merchants or the marketplace.
2. **Sync Products** - Select the exact type of products you would like to sync and export.
3. **Product Distribution** - Filter products by category, brand, or tag, sync once, and let the automation handle the rest.

== External Services ==

This plugin connects to Importify services to provide supplier authentication, product sync, merchant distribution, and marketplace features.

=== Service 1: Importify Core API ===
* **Domain / Base URL:** https://importify.co.za/api/
* **Provider:** Importify
* **Why the plugin connects:**
  - Validate account tokens and identify supplier account status.
  - Create/update supplier catalog records and merchant connection states.
  - Save marketplace publishing settings.
  - Upload/sync product image references and SKU sync state.
* **What data is sent to this service:**
  - Authentication data: Account API token, supplier ID, authorization token header.
  - Account/profile data returned from token validation flows (for example: username, email, business name, premium/trial status, supplier endpoint/token metadata).
  - Product/catalog data you choose to sync: product title, description, SKU, price, stock, category/tag/brand mappings, image URLs, active status.
  - Marketplace settings: publish toggle, selected categories/tags/brands, currency and currency symbol.
  - Merchant connection actions: connection ID and approval status changes.
* **When data is sent:**
  - On account connect/validate actions in settings.
  - On dashboard/settings loads that refresh account/supplier token metadata.
  - On product sync, product update/delete/toggle actions, bulk status actions, and SKU registration.
  - On marketplace settings save/update operations.
  - On image upload and image synchronization operations.
* **Related code paths (evidence):**
  - includes/class-api-client.php (requests to auth/* and v2/* endpoints)
  - admin/dashboard.php (account token validation and supplier products.json/stat calls)

=== Service 2: Importify Marketplace / Public Catalog Delivery ===
* **Domain / Base URL:** https://items.importify.co.za/
* **Provider:** Importify
* **Why the plugin connects:**
  - Fetch supplier public products.json for product counts/stats and dashboard previews.
  - Serve supplier catalog feeds used by merchant import flows.
* **What data is sent to this service:**
  - Supplier identifier in request path (for example: /{supplier_id}/products.json).
  - Standard web request metadata handled by normal HTTPS traffic (for example: IP and user-agent at transport level).
* **When data is sent:**
  - On dashboard stats/product-count fetches.
  - When public supplier catalog URLs are accessed for merchant import workflows.

=== Terms and Privacy (Importify Services) ===
* **Terms of Service:** https://importify.co.za/tos
* **Privacy Policy:** https://importify.co.za/privacy-policy

=== Bundled Third-Party Libraries ===
* **Tailwind CSS (v2.2.19):** Bundled locally in the plugin package
* **Font Awesome Free (v6.4.0):** Bundled locally in the plugin package
* **Purpose:** Enhance the WordPress admin interface styling and icons
* **Runtime behavior:** No remote CDN CSS/JS files are loaded by this plugin

**Account Required:** Yes. You will need a valid Importify account to use this plugin. Sign up at https://importify.co.za/register

== FAQ ==

= Does this plugin require WooCommerce? =
Yes. This plugin is specifically designed to transform an existing WooCommerce store into a fully functional supplier hub.

= Are there limits on how many products I can sync? =
No. We offer unlimited product exports and unlimited syncs to seamlessly support your business scale.

= Can I export to Shopify stores? =
Yes! Importify allows you to export your WooCommerce products directly to your merchants' Shopify stores.

= How can i contact Customer Care? =
By sending an email to help@importify.co.za, or log a customer support ticket - you can also contact us directly on WordPress.

== Changelog ==

= 2.0.0 =
* Optimized description for better professional clarity.
* Added Marketplace discovery features.
* Enhanced API synchronization for real-time updates.

= 1.0.0 =
* Initial release.
* Added core product syncing and stock tracking features.

== Upgrade Notice ==

= 2.0.0 =
This version introduces real-time marketplace discovery features and optimized API synchronization. Upgrading is highly recommended for stability.