=== Rafgrid – Spreadsheet Bulk Editor for WooCommerce ===
Contributors: raffie
Tags: bulk edit, spreadsheet, woocommerce, csv, products
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.3
Stable tag: 2.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bulk edit posts, pages, WooCommerce products and any post type in a fast spreadsheet, with filters, formulas, CSV/XLSX and undo.

== Description ==

Rafgrid shows your content as a spreadsheet: filter, sort, edit cells inline, run bulk operations (set, replace, append, prepend, increase/decrease, formulas), manage WooCommerce prices and stock, save column layouts and views, export/import CSV and XLSX, and undo bulk changes.

WooCommerce is optional. Without it, Rafgrid edits posts, pages and any other post type; with it, the Products list gains SKU, price, stock, variation and order tools.

* All public post types + WooCommerce products (SKU, prices, stock, weight, dimensions, visibility, featured).
* Taxonomies, featured images, authors, dates, custom fields (meta:KEY).
* Views: saved filter + column presets per user.
* Undo history for bulk operations and a per-cell audit log.
* Every read and write uses the WordPress capability for that exact item: authors only see and edit their own items, publishing and deleting need the matching rights.
* Automation rules, background jobs, snapshots and a supplier price feed for administrators.
* A built-in MCP endpoint so AI assistants can work with content and catalog data, authenticated with WordPress Application Passwords.
* Ten interface languages: English, Spanish, German, French, Brazilian Portuguese, Russian, Turkish, Armenian, Japanese and Simplified Chinese; translation-ready.

Rafgrid is not affiliated with or endorsed by WooCommerce or Automattic.

== External services ==

This plugin works fully offline by default. It contacts external services
only when an administrator explicitly configures and triggers them:

* AI text generation - uses the WordPress AI Client (WordPress 7.0+) with
  the provider the site owner configured for the whole site. Only when that
  is unavailable, and only if an administrator entered a fallback
  OpenAI-compatible endpoint (base URL, own API key, model) in the plugin
  settings, is the request sent to that endpoint instead. In both cases the
  item title and a trimmed excerpt of its content are sent when an editor
  runs AI generation. No provider, URL or key is bundled. The terms and
  privacy policy of the provider the administrator chose apply.
* Supplier price feeds - the plugin fetches a CSV from a URL the admin saved
  in settings (sku, price, stock) when sync runs manually or on schedule.
* Webhooks - after bulk operations, a short text summary (column, mode,
  counts, editor name) is posted to a webhook URL the admin configured
  (for example a Slack/Telegram bridge).
* Image sideloading - images are downloaded from URLs an editor enters.
* Link checker - sends HEAD requests to the external links found in your
  published content when an editor runs it.
* MCP server - the plugin *provides* a REST endpoint for AI clients that
  authenticate as a WordPress user with an Application Password; it calls
  no external service itself.

No telemetry, tracking or advertising requests are made.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` and activate.
2. Open Rafgrid in the admin menu.
3. The TypeScript sources are in `src/`; run `npm install && npm run build` to rebuild `build/` (release zips already include it).

== Frequently Asked Questions ==

= Does it work without WooCommerce? =
Yes. WooCommerce columns appear only for the `product` type when WooCommerce is active.

= Is it safe for large catalogs? =
Rows are paged server-side (10–200 per page), bulk operations are capped, every save checks capabilities and nonces.

= How do AI assistants connect? =
Create an Application Password in Users -> Profile and use it as Basic auth for the endpoint shown in Settings. The assistant acts as that WordPress user and gets content and catalog tools only - no user, role, plugin, theme or site-settings tools.

== Screenshots ==

1. Spreadsheet with filters, bulk panel and column manager.

== Support ==

Author: Raffi Hakobyan - https://raf.am - hakobyan@raf.am

== Changelog ==

= 2.1.0 =
* Seven new interface languages: Spanish, German, French, Brazilian Portuguese, Japanese, Simplified Chinese and Turkish (plus English, Russian and Armenian).
* New plugin icon.

= 2.0.0 =
* New name: Rafgrid. Settings, views, history, audit log, rules, notes and snapshots move to the new names automatically.
* Security: object-level capability checks (edit, publish, delete) on every item for the sheet, bulk edits, paste, import, undo, merges, notes, images and MCP.
* Security: user role and email changes follow the core user editor rules; user tools removed from MCP.
* Security: protected custom fields (meta:KEY) are editable by administrators only, unless offered as a column or allowed by WordPress; custom field values are sanitized.
* Security: automation rules, scheduled exports and feeds run as the administrator who set them up; WP-CLI runs as the --user you pass.
* MCP authenticates with WordPress Application Passwords only; the plugin's own keys and tokens were removed.
* Snapshots and scheduled exports are stored as private files.
* AI uses the WordPress AI Client, with an optional OpenAI-compatible fallback connection.

= 1.16.0 =
* Last release under the previous name.

= 1.14.0 =
* Full localization: Russian completed (0 untranslated) and Armenian (hy) added for every string, including JS bundles.

= 1.13.0 =
* Stability & security refactor: admin gates for rules/snapshots/feeds, SSRF guard, upgrade routine, guarded background jobs, MCP REST dedupe.

= 1.12.0 =
* MCP: set SEO (Yoast + Rank Math in one call), in-content images via the image import insert mode.

= 1.11.0 =
* Standard AI connection prompt in Settings and Documentation, also served natively via MCP prompts/list and prompts/get.

= 1.9.0 =
* Multilingual in-admin Documentation page covering every feature.

= 1.8.0 =
* MCP access control: modes (full/read-only/custom), role gates, tool groups, deny-list, rate limiting, IP allowlist, call log.

= 1.7.0 =
* MCP server: Model Context Protocol (Streamable HTTP) endpoint for AI clients.

= 1.6.0 =
* Automation release: rules engine, formulas, scheduled bulk, presence, notes, merchant feed, slug redirects, config portability.

= 1.5.0 =
* Everything release: staged edits, column filters, formatting rules, totals, orders/users sheets, supplier feed, snapshots, AI, WP-CLI, webhooks, locks.

= 1.4.0 =
* All-in release: Excel paste, dry-run preview, apply-to-filtered, background jobs, audit log, variations, XLSX, terms/comments sheets, ACF/SEO columns, plugin language.

= 1.3.0 =
* PHP 8.3 (backed enum for bulk modes, typed constants), TypeScript sources.

= 1.2.0 =
* @wordpress/api-fetch for all requests, WooCommerce HPOS compatibility declaration, REST argument schemas.

= 1.1.0 =
* @wordpress/scripts 37, ES imports + createRoot, PHP 8 functions, updated requirements.

= 1.0.0 =
* Initial release.
