=== Jon's Product Feed for Google Merchant Center ===
Contributors: jonthewebb
Tags: google, merchant, woocommerce, shopping, product feed
Requires at least: 6.0
Tested up to: 7.0.2
Requires PHP: 8.1
Stable tag: 1.4.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Syncs WooCommerce products to Google Merchant Center via the Merchant API.

== Description ==

Jon's Product Feed for Google Merchant Center solves the problems issues present in the official WooCommerce Google Merchant plugin, and also adds many features for finding errors and debugging your merchant feed. It connects your WooCommerce store to Google Merchant Center using the Merchant API — no feed files, no delays. Changes are pushed instantly and can be verified immediately with the plugin's status check features. Now compatible with the latest Google Merchant API!

= Free plan includes =
* Full and delta sync to a single market
* Core product fields: title, price, images, availability, brand, MPN, GTIN, condition
* Attribute and term value mappings (color, size, gender, age group, etc.)
* Scheduled automatic sync (twice daily)
* Per-product exclusion from feed
* Log viewer

= Pro plan adds =
* Multi-market sync (multiple countries from one store)
* Sync preview on variations shows what data will be submitted to Google
* Per-category exclusion from feed
* Per-variation availability date from lead time and due date meta
* Lead time and due date can be mapped from your existing stock system values if present
* Google product category mapping with taxonomy search
* Product types from WooCommerce category hierarchy
* Sale price effective date
* All five custom labels (automatic, tag-mapped, category-mapped, and per-product)
* Offer ID map — override offer IDs to preserve Google review history on migration
* Bulk issue reports — scan all Merchant Center products and export issues to CSV

== External Services ==

This plugin connects to Google's APIs to provide its core functionality.

= Google Merchant API =
When you sync products, data including product title, description, price, availability, images, SKU, brand, GTIN/MPN, Google product category, and mapped attributes is sent to Google Merchant Center via the Google Merchant API. Data is transmitted when you trigger a sync manually or via the scheduled automatic sync. No data is sent until you configure and connect the plugin.

Service provided by Google LLC.
* [Google Terms of Service](https://policies.google.com/terms)
* [Google Privacy Policy](https://policies.google.com/privacy)
* [Merchant API documentation](https://developers.google.com/merchant/api)

= Google Product Taxonomy =
When you click "Refresh taxonomy" in the plugin settings, a request is made to fetch Google's public product taxonomy file from google.com. The taxonomy is stored locally in your WordPress database and used to power the category search. No personal data is sent in this request.

Service provided by Google LLC.
* [Google Terms of Service](https://policies.google.com/terms)
* [Google Privacy Policy](https://policies.google.com/privacy)

== Installation ==

1. Upload the plugin folder to /wp-content/plugins/.
2. Activate the plugin through the Plugins menu in WordPress.
3. Go to Merchant Feed > Settings to configure your Google API credentials.

== Frequently Asked Questions ==

= Where can I get support? =

Get support for this plugin at [plugins.justridingalong.com](https://plugins.justridingalong.com/google-merchant-feed-plugin-for-woocommerce/).

== Upgrade Notice ==

= 1.4.1 =
Bug fix for 1.4.0: sync could pick a non-API (e.g. scheduled-fetch) data source and fail every product with an INVALID_ARGUMENT/fileInput error. If you saw that, update, then go to Settings and click "Reset data source" once.

= 1.4.0 =
Required update: migrates to Google's Merchant API before the Content API for Shopping shuts down 18 Aug 2026. After updating, go to Merchant Feed > Settings and click "Register Cloud project with Merchant Center" — a one-time step Google now requires.

= 1.3.0 =
Introduces a free and Pro plan. All existing functionality continues to work. Advanced features (multi-market, category exclusions, custom labels, reports, offer ID map) are now part of the Pro plan.

== Changelog ==

= 1.4.1 =
* Fix: Sync could resolve to a non-API-type Merchant Center data source (e.g. a scheduled-fetch/file feed) instead of the API one, causing every product upsert to fail with "INVALID_ARGUMENT: [dataSource] ... API data sources cannot have a `fileInput` field set." The data source lookup now requires Input::API explicitly, not just non-legacy.
* New: "Reset data source" button in Settings — clears the cached data source so the next sync re-detects the correct one. Needed once if you were affected by the above.

= 1.4.0 =
* Changed: Migrated from the Content API for Shopping (discontinued by Google on 18 August 2026) to the new Merchant API. Existing connections and synced listings carry over automatically — no reconnection needed.
* New: "Register Cloud project with Merchant Center" button in Settings. Google's Merchant API requires each Google Cloud project to be registered against the Merchant Center account once (separate from OAuth); without it, sync fails with a GCP_NOT_REGISTERED error. Required after updating to 1.4.0.

= 1.3.3 =
* New (Pro): Set a custom feed price for bundle and composite products directly from the Merchant Feed tab on the product edit page — no longer requires manually adding a custom field.
* New (Pro): Map an existing product meta key to the bundle/composite feed price via plugin settings, so prices managed by your stock system are picked up automatically. The per-product field is disabled and shows the mapped value when a mapping is active.
* New: Sync preview button on the Merchant Feed tab for simple, bundle, and composite products — shows all fields that will be submitted to Google without triggering a sync.
* Improvement: Replaced the inline Google Cloud setup guide with a link to the full setup guide on the plugin website.

= 1.3.1 =
* New: Map existing stock-system meta keys to the lead time and due date fields via plugin settings. When a mapping is active the per-variation inputs are disabled and show the value as interpreted by the plugin, making it easy to verify date format configuration.
* New: Specify a PHP date format alongside the due date meta key mapping (defaults to Y/m/d when left blank). Lead time values are cast to integer, so formats such as "5 days" are handled automatically.
* New: Sync preview button on each variation panel — shows all fields that will be submitted to Google including offer ID, item group ID, availability date, custom labels, and images, without needing to trigger a full sync.
* Improvement: Availability date row in the fetch-status panel now always renders, showing — when no date is indexed, making it easier to confirm availability date configuration.
* Fix: Due date and lead time meta key mapping settings were not persisting — they were silently dropped by the settings save allowlist.

= 1.3.0 =
* New: Introduced free and Pro plans. Core sync features remain free. Advanced features — multi-market sync, per-category exclusion, Google product category mapping, custom labels, availability date, offer ID overrides, and bulk issue reports — are now part of the Pro plan.

= 1.2.20 =
* Fix: WordPress.org review compliance — plugin name, external services documentation, inline script enqueuing, nonce sanitization, CSV validation.

= 1.2.18 =
* Fix: WordPress plugin checker compliance improvements.

= 1.2.0 =
* Initial public release.

== Screenshots ==

1. Check the live status of any product or variation, and see what needs fixing
2. Map attributes and terms from your website to Google attributes
3. Map your categories to Google product categories for increased visibility
4. Generate report of all issues to find and fix problems
5. Report detail shows products with issues