=== CatCode Sync with Salla for WooCommerce ===
Contributors: catcodestudio
Tags: salla, saudi arabia, product import, migration, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Brings products, prices, photos and categories from a Salla store into WooCommerce, without duplicates.

== Description ==

You have a store on Salla and want the same catalogue in WooCommerce: to move over, or to sell in both. This plugin reads your Salla store through its official API and fills WooCommerce, so nobody retypes products.

Salla is a third-party product. This is an independent integration, not affiliated with or endorsed by Salla.

= What it does =

* **Products.** Name, description, price, sale price, SKU, stock, weight and whether the product ships.
* **Photos.** Main photo and up to 7 more go to your Media Library.
* **Categories,** with their parents.
* **No duplicates.** A product is found again by its Salla id, then by SKU. Import as often as you like: prices and stock are updated, and what you edited here stays unless you ask otherwise.
* **Hidden products** come as drafts.

= Built not to lose anything =

* The import runs in the background, one job at a time, and keeps to the call limit of your Salla plan.
* If Salla does not answer, the job is tried again later. The Activity tab shows what is waiting, what failed and why, with a Retry button.
* The access to Salla is renewed by itself and kept encrypted with your site's keys.
* A staging copy stays quiet. Salla access can be renewed only once, so if the site's address changes, everything stops until you confirm that this is the real store.

= What it does not do =

* It does not convert currency. If Salla and WooCommerce differ, it stops and says so.
* It does not change anything in your Salla store.
* It does not bring products of the types group, codes, digital, donation or booking, and it does not bring reviews or customers.
// @pro-begin

= Pro =

Sold on [catcode.com.ua](https://catcode.com.ua/modules/salla-woocommerce/) with a 7-day trial:

* **Products with variants.** Options become attributes, and each variant keeps its own price, SKU and stock.
* **Stock in step both ways.** A sale in either store lowers the quantity in the other. Products you did not import are linked by SKU.
* **Orders.** Salla orders appear in WooCommerce with customer, address, items and totals, without doubles. They lower no stock here and send no e-mails, because Salla has already done both.
* **Order status in step both ways,** by a table you can change.
* **Instant updates** through signed webhooks, on top of reading the list every 10 minutes.
* **E-mail alerts** when Salla stops accepting the access or a job gives up.
// @pro-end

== Installation ==

1. Install and activate the plugin. WooCommerce must be active, in the same currency as your Salla store.
2. Open [Salla Partners](https://portal.salla.partners/), create and verify an account, and create an app of the Private type. Salla reviews private apps.
3. In the app give it the scopes the **WooCommerce > Salla** screen names, and paste the address shown there.
4. Copy the Client ID and the Client Secret Key into that screen, then press **Connect** and approve in Salla.
5. On the **Products** tab press **Import products from Salla**. Check a few products before relying on it.

== Frequently Asked Questions ==

= Why do I need my own Salla app? =

Salla gives API access only through an app. With your own private app, your data goes from Salla straight to your site and passes through no one else.

= Does this need a CatCode account? =

No. The plugin talks to Salla directly, with your own app.

= Can I run both stores at once? =

Yes. The plugin changes nothing in Salla. Keep in mind that an import copies stock once, it does not keep it in step.

= A product did not come over. What now? =

The Activity tab gives the reason. Fix it and press Retry, or import again.

= Will importing again overwrite my edits? =

Prices and stock are updated. Name, description, categories and photos stay, unless you tick the option on the Products tab.

= My prices look wrong by the tax. =

Prices are written as Salla shows them. Check that "Prices entered with tax" in WooCommerce matches how your Salla store is set.

== External services ==

This plugin connects to Salla, an e-commerce platform run by a third party, because reading your Salla store is its purpose.

It connects, from your server, to accounts.salla.sa and api.salla.dev:

* when you press Connect, and when the access is renewed: your app's Client ID and Client Secret Key, and the code or token Salla issued, to obtain access;
* when you test the connection or import: the access token, to read your store's name, categories and products.

Photos are fetched from the addresses Salla gives for them, cdn.salla.sa for example, into your Media Library.

Nothing is sent before you connect. Salla: [terms of use](https://salla.com/en-sa/terms), [privacy policy](https://salla.com/en-sa/privacy).

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
