=== Trendyol Connector for WooCommerce ===
Contributors: catcodestudio
Tags: trendyol, marketplace, turkey, pazaryeri, entegrasyon
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

Sell your WooCommerce products on Trendyol: link your Trendyol products and keep prices and stock in sync automatically.

== Description ==

You sell in your own WooCommerce shop and on Trendyol. Every price change and every sale has to be repeated in the Trendyol seller panel — or a product oversells. This plugin connects the two through the official Trendyol Marketplace API.

= Free =

* Connection with your seller id, API key and API secret (live or stage environment); the key and secret are stored encrypted.
* Import of the approved products of your Trendyol store, linked to WooCommerce products and variations by barcode (GTIN/EAN or SKU) or stock code. A report shows the Trendyol products without a product in the shop.
* Price and stock sync of the linked products, automatically a few minutes after a change (a sale, an edit, an import) and on demand. Only changed data is sent; Trendyol's result for every barcode is read back and shown on the product.
* Price rules: WooCommerce price with or without KDV (Trendyol prices include it), markup in % and a fixed add-on, a conversion rate for another shop currency, rounding (,90 / ,99 / whole lira), the regular price as the crossed-out list price during a sale.
* Stock reserve kept for your own shop, a quantity for products without stock management; a product that is unpublished, deleted or switched off gets zero stock on Trendyol.
* Trendyol status of every linked product: on sale, locked (with the reason), archived, blacklisted, price on Trendyol, link to the product page.
* API log for 30 days; the key and secret are never logged.

= Pro =

* Trendyol orders in WooCommerce — instantly through a Trendyol webhook registered from the plugin, plus a check every 5 minutes as Trendyol recommends. Buyer, delivery and invoice address (province, district, neighbourhood), corporate invoice data, products with KDV, seller and Trendyol discounts, cargo company. The stock goes down here.
* Cancellations and package splits on Trendyol handled in WooCommerce, with the stock restored.
* Package status back to Trendyol: "Picking", "Invoiced" (with the invoice number), or "cannot supply" with a reason when an order is cancelled.
* e-Archive / e-Invoice links sent to Trendyol from the order screen.
* Cargo: tracking number and link, Trendyol's common label (ZPL) for TEX and Aras Kargo shipments, a printable packing slip with the cargo barcode (CODE128).
* Publishing: create products on Trendyol with category, brand, attributes (automatically from product attributes or mapped per category), images, desi, KDV and variants.
* Buybox monitor: your place, the buybox price and other sellers, with an e-mail when you lose first place.

Pro can be tried for 7 days for free, no card needed.

= Languages =

English, Turkish (tr_TR).

= Requirements =

* A Trendyol seller account; the seller id, API key and API secret are in the seller panel under Hesap Bilgilerim → Entegrasyon Bilgileri (visible to the main user of the store).
* WooCommerce 7.0 or newer; HPOS and the classic orders storage are both supported.
* For the webhook: the site must be reachable from the internet, and its address may not contain "trendyol" (a Trendyol rule).

Trendyol is a trademark of its owner. This is an independent integration, not affiliated with or endorsed by Trendyol.

== Installation ==

1. Upload the plugin and activate it.
2. WooCommerce → Trendyol → Connection: enter the seller id, API key and API secret, save and press "Check the connection".
3. Listings: check the price rules and press "Import and link products". Linked products keep their Trendyol price and stock in sync from now on.
4. Pro — Connection: register the webhook. Orders: switch on the import.

== Frequently Asked Questions ==

= Does the plugin create products on Trendyol? =

The free version keeps the price and stock of approved Trendyol products in sync. New products are created in the seller panel or, with Pro, published from the product editor; Trendyol reviews them before they go on sale.

= Is there a Trendyol test account? =

Trendyol opens its stage environment only for IP addresses it has whitelisted, with separate credentials. The plugin is built on the official Trendyol integration documentation and tested against a simulation of the API; the log shows every call and Trendyol's answer, so a refusal is always visible with Trendyol's own text.

= Why is my change not on Trendyol yet? =

Trendyol processes stock and price updates in the background. The plugin reads the result a minute later and shows it on the product: accepted, or refused with Trendyol's reason. Trendyol refuses an identical update repeated within 15 minutes, so unchanged data is never resent inside that window.

== External services ==

This plugin connects to the Trendyol Marketplace API (apigw.trendyol.com, or stageapigw.trendyol.com for the test environment) with the seller id, API key and API secret you enter. It sends barcodes, prices and stock when products change or when you press a sync button, reads your approved products, and — with Pro — reads your order packages, receives webhook calls from Trendyol, registers that webhook (its address and a secret key), sends package status changes, invoice links, label requests and product data for publishing (title, description, images, brand, category, attributes, barcode, price, stock). Trendyol integration documentation and terms: https://developers.trendyol.com/ ; Trendyol seller panel: https://partner.trendyol.com/

The Pro build also contacts the CatCode licence server (catcode.com.ua) to activate and verify a licence key or to start a trial: it sends the key, the site address and, for a trial, the e-mail you enter. Terms and privacy: https://catcode.com.ua/

== Changelog ==

= 1.0.0 =
* First release: product import and linking, price and stock sync with per-barcode results, price rules, API log. Pro: orders through webhook and polling, cancellations and splits, package status and invoice links back to Trendyol, common labels and packing slips, publishing, Buybox monitor.
