=== RedFace Product Sync for WooCommerce ===
Contributors: redfacesa
Tags: woocommerce, products, inventory, sync, redface
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 7.0
WC tested up to: 9.0
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync WooCommerce products and inventory with RedFace — one platform, one Commerce API.

== Description ==

**RedFace Product Sync for WooCommerce** pushes your WooCommerce catalog and stock levels to RedFace so products appear in marketplace, Pay links, and the Business OS.

* Official RedFace plugin — same four-step connection wizard
* Auto-sync on product save (optional)
* Bulk sync + hourly background sync
* Variable products sync as parent + variants
* Modules loaded: core, auth, products, orders, customers

Works alongside **RedFace Pay** and **RedFace Pay for WooCommerce** — shared merchant identity and API keys.

== Installation ==

1. Install and activate WooCommerce.
2. Upload `redface-product-sync-for-woocommerce` to `/wp-content/plugins/` and activate.
3. Complete **RedFace Product Sync → Connection** (Merchant ID + API key with write scope).
4. Run **Product sync → Sync all products now** for the initial import.

== Configuration ==

* API key must include **products** write scope.
* Enable auto-sync to push changes whenever you save a product in WooCommerce.
* Stock updates sync when inventory management is enabled on the product.

== External services ==

This plugin connects to the **RedFace Commerce API** to sync WooCommerce products and inventory with the RedFace platform (marketplace, Pay links, and Business OS inventory).

**What is sent and when**

* On manual sync, auto-sync (product save), or hourly background sync, the plugin sends your configured **Merchant ID** and authenticates with your **API key** (stored in WordPress options; never embedded in the plugin).
* Product payloads may include: name, description, SKU, price, sale price, stock quantity, product type, categories, image URLs, and variant attributes for variable products.
* A connection test (`ping`) runs when you complete the connection wizard or test settings in wp-admin.

**Default API endpoint**

`https://bpzzgilwlkghgfkvkkxx.supabase.co/functions/v1/commerce-api`

Merchants may override the API base URL in plugin settings (e.g. for staging).

**Service provider**

RedFace (RedFace Pay) — African commerce infrastructure.

* Terms of use: https://www.redfacepay.co.za/legal/terms
* Privacy policy: https://www.redfacepay.co.za/legal/privacy

== Frequently Asked Questions ==

= Does this replace WooCommerce? =

No. WooCommerce remains your storefront; RedFace is the commerce graph behind payments, marketplace, and inventory.

= Which product types sync? =

Simple and variable products. Other types are skipped.

== Changelog ==

= 1.0.1 =
* Approved and published on WordPress.org.
* Add Requires Plugins: woocommerce header.
* Document RedFace Commerce API external service (terms + privacy links).
* Contributor list updated for WordPress.org.

= 1.0.0 =
* Initial release — product sync, inventory push, admin hub, Commerce API client.
