=== Market Feeds for WooCommerce — Rozetka, Prom, Epicentr, Kasta ===
Contributors: catcode
Tags: woocommerce, rozetka, prom, product feed, marketplace
Requires at least: 5.7
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Export WooCommerce products as XML/YML feeds for Ukrainian marketplaces: Rozetka and Prom.ua for free, Epicentr and Kasta in Pro.

== Description ==

The plugin publishes your catalogue in the format Ukrainian marketplaces accept: a `yml_catalog` document with categories, offers, prices, stock, images and attributes. The admin screen is in Ukrainian, which is the language of the shops these marketplaces serve.

**Free**

* Rozetka feed (`stock_quantity`) and Prom.ua feed (`quantity_in_stock`)
* Streaming generation through XMLWriter — a catalogue of tens of thousands of offers never sits in memory
* Variations exported as separate offers with `group_id`, variation attributes as `<param>`
* Sale price becomes `<price>`, the regular one becomes `<price_old>`
* Prices with or without tax, configurable number of decimals
* Stock quantity, stock threshold, backorders, custom availability labels
* Full / trimmed / no description, optional HTML stripping
* SKU or product ID as `vendorCode`, GTIN as `barcode`, brand from the WooCommerce brand taxonomy or an attribute
* Scheduled file cache and a token-protected feed URL

**Pro**

* Epicentr and Kasta feeds
* Filters: selected categories, selected brands, excluded product IDs
* Price multiplier (for example +5% to cover the marketplace fee)
* Product name prefix and suffix
* UTM tags on product links
* Hourly cache refresh

Pro unlocks with a licence key, or with a real 7-day trial key you request in one click from the settings screen (e-mail only, no card). The trial never starts by itself: a fresh install is simply the free tier.

When Pro lapses the shop is not left without feeds — Rozetka and Prom.ua keep being served, on the whole catalogue, and the XML files already generated are not deleted. Only what was paid for stops: Epicentr and Kasta, filters, the price multiplier, name prefix/suffix, UTM tags and hourly refresh.

The key is checked against catcode.com.ua and re-checked once a day; if our server is unreachable Pro keeps working for another 14 days. Licences are annual (1–5 years) and include updates and support for that term.

== Installation ==

1. Install and activate the plugin.
2. Go to WooCommerce → «Фіди маркетплейсів».
3. Enable the marketplaces you need, adjust price and stock rules, save.
4. Copy the feed URL and paste it into your marketplace account.

== Frequently Asked Questions ==

= Does it work without pretty permalinks? =

Yes. The `?ccmf_feed=rozetka&token=…` form is always available; with permalinks enabled you also get `/ccmf-feed/rozetka.xml?token=…`.

= Can anyone download my catalogue? =

The feed is protected by a token in the URL. You can regenerate the token in one click — the old link stops working immediately.

= How large a catalogue does it handle? =

Generation is streamed and paginated, so the limit is PHP execution time rather than memory. For large catalogues keep the cache on: the marketplace then downloads a ready file.

== Changelog ==

= 1.1.0 =
* Licensing moved to the CatCode licence server: key activation, daily re-check, 14-day offline grace, one activation slot per shop.
* Trial on request instead of automatically: a click and an e-mail issue a real 7-day key. A fresh install no longer pretends to be Pro.
* Pro fields stay in place, greyed out, with a `Pro` badge and a line saying what each one gives.
* One notice instead of a recurring trial banner: it appears only after a feed has actually been generated or fetched, and closing it closes it for good.
* Saving the settings form no longer wipes the licence key, status or trial flag.
* Fixed: switching the licence on or off now re-plans the cache cron in the same request, so hourly refresh starts (and stops) immediately.

= 1.0.0 =
* First release: Rozetka, Prom.ua, Epicentr, Kasta, scheduled cache, token-protected URLs.
