=== Lindystream: Product Feed for SureCart ===
Contributors: aurefau
Tags: surecart, google merchant center, product feed, google shopping, woocommerce
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generates fully compliant XML product feeds for Google Merchant Center from your SureCart store.

== Description ==

**Lindystream: Product Feed for SureCart** automatically builds and serves XML product feeds from your SureCart store for Google Merchant Center.

= Features =
* Fully compliant XML feeds for Google Merchant Center
* Unlimited products
* Variant expansion with `item_group_id`
* All required attributes: GTIN, MPN, brand, condition, custom labels, and more
* Automatic refresh via WP-Cron (configurable interval)
* Per-product overrides via the classic WordPress editor meta box (title, description, GTIN, MPN, custom labels, exclusions)
* Optional security token for feed access control

= Feed Compliance =

This plugin generates feeds compliant with Google product data specifications:
- RSS 2.0 with `xmlns:g` namespace
- All required attributes: `id`, `title`, `description`, `link`, `image_link`, `availability`, `price`
- All recommended attributes: `brand`, `condition`, `gtin`, `mpn`, `identifier_exists`, `google_product_category`
- Variant attributes: `item_group_id`, `color`, `size`, `pattern`, `material`, `age_group`, `gender`
- Up to 10 `additional_image_link` entries per product
- Custom labels 0–4, shipping label, `is_bundle`, `adult`

= Developer Hooks =

**Filters:** `scgmf_feed_items`, `scgmf_feed_item`, `scgmf_item_extra_elements`, `scgmf_option_attribute_map`, `scgmf_meta_box_post_types`

**Actions:** `scgmf_feed_generated` (passes `$xml`, `$lang_code`, and `$platform`)

= Requirements =
* WordPress 6.2+
* PHP 7.4+
* [SureCart](https://wordpress.org/plugins/surecart/) plugin installed and active

== External Services ==

This plugin connects to the SureCart REST API to retrieve your store's product data whenever a feed is generated or settings are verified.

**What is sent:** Your SureCart store API key (as a Bearer token in the Authorization header) and standard query parameters (status, page, limit). No personal visitor data is transmitted.

**When it is sent:** During manual or scheduled feed generation, and when the built-in connection diagnostics are run.

**Service provider:** SureCart, Inc.
* Service URL: https://api.surecart.com/
* Terms of Service: https://surecart.com/terms/
* Privacy Policy: https://surecart.com/privacy-policy/

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. Activate from **Plugins → Installed Plugins**
3. Go to **Lindystream** in the WordPress admin sidebar
4. Click **Regenerate the Feed** on the **General** tab to build your first feed
5. Register the feed URL in Google Merchant Center

== Frequently Asked Questions ==

= Does this support product variants? =
Yes. Each variant becomes a separate feed item with `item_group_id` pointing to the parent product.

= How do I restrict access to the feed URL? =
Set a security token on the **General** tab — the feed URL will then require `?token=YOUR_TOKEN`.

= Which platforms are supported? =
Google Merchant Center. The plugin generates a fully compliant Google Shopping XML feed.

= How do I edit per-product feed fields? =
Open any SureCart product in the classic WordPress editor and use the **Product Feed Settings** meta box.

= How often is the feed refreshed? =
Feeds are refreshed automatically via WP-Cron at a configurable interval (default: 6 hours). You can also trigger a manual regeneration from the **General** tab.

== Changelog ==

= 1.1.1 =
* Added Pro upgrade banner to the settings page.

= 1.1.0 =
* Plugin renamed to match WordPress.org assigned slug (`lindystream-product-feed-for-surecart`).
* Removed UTF-8 BOM from PHP files causing unexpected output on activation.

= 1.0.8 =
* Fixed text domain to match plugin slug (`lindystream-product-feed-sc`).
* Updated tested up to WordPress 7.0.

= 1.0.7 =
* WordPress.org compliance pass: removed all Pro upsell references, removed Meta platform code, corrected text domain, moved inline JS to enqueued file, renamed main class for uniqueness.

= 1.0.6 =
* Text domain updated to `lindystream-product-feed-for-surecart` to match plugin slug.
* Moved all admin JavaScript to enqueued `admin.js` file (removed inline scripts).
* Main plugin class renamed to `SCGMF_Plugin` for uniqueness.

= 1.0.5 =
* Removed Freemius SDK and all licensing / product-limit logic to comply with WordPress.org Plugin Directory Guidelines (Guideline 5 — no trialware).
* Removed Pro-only features from the free plugin: Microsoft Advertising feed, Pinterest feed, WPML/Polylang multilingual support, per-language feeds, IP allowlist, static file/CDN export, and unit pricing fields.
* Plugin is now fully free and functional with unlimited products.

= 1.0.4 =
* Renamed plugin from "Product Feed for SureCart" to "FeedBridge for SureCart" to comply with WordPress.org plugin-naming policy.
* Added External Services documentation in readme.

= 1.0.3 =
* Renamed plugin from "SureCart Google Merchant Feed" to "Product Feed for SureCart" for WordPress.org compliance. Text domain renamed to `product-feed-sc`.

= 1.0.2 =
* Follow-up Plugin Check pass: suppressed false-positive sniffs, switched sanitization to absint(), added NonceVerification annotation.

= 1.0.1 =
* Hardening pass for WordPress.org Plugin Check: i18n alignment, escape-output coverage, WP_Filesystem replacement, nonce/sanitization annotations.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.1.1 =
Adds a small Pro upgrade banner to the settings page.

= 1.1.0 =
Plugin file renamed to match wp.org slug. BOM fix resolves activation warning.

= 1.0.8 =
Text domain fix and WordPress 7.0 compatibility confirmed.

= 1.0.7 =
WordPress.org compliance update. No functional changes to the Google feed.

= 1.0.6 =
Text domain and class naming updated for WordPress.org compliance. Admin JS moved to enqueued file.

= 1.0.5 =
Freemius SDK removed; plugin is now fully free with unlimited products. Pro-only features (Microsoft, Pinterest, multilingual, IP allowlist, static file, unit pricing) have been moved to the paid version.

= 1.0.4 =
Plugin renamed to "FeedBridge for SureCart" for WordPress.org compliance. Existing settings preserved.
