=== Sheet Wise – WordPress to Google Sheets Automation for Forms, Users, Posts & WooCommerce ===
Contributors: sapayth
Tags: google sheets, spreadsheet, woocommerce, contact form 7, export
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 2.1.0
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync WordPress users, posts, comments, WooCommerce orders, and Contact Form 7 submissions to Google Sheets automatically.

== Description ==

Sheet Wise connects your WordPress site to Google Sheets so your data flows automatically. When a user registers, a form is submitted, or an order comes in, the data appears in your spreadsheet within seconds.

**Who is this for?**

- Store owners who track orders, customers, and inventory in spreadsheets
- Site admins who need user registrations and form submissions in a central sheet
- Agencies managing content workflows across WordPress and Google Sheets
- Anyone tired of manually copying data from WordPress to spreadsheets

**What can you sync?**

- User registrations, profile updates, logins, logouts, and deletions
- Posts created, edited, or trashed
- Comments added or edited
- WooCommerce orders, products, and order status changes
- Contact Form 7 form submissions with auto-detected fields

**Features that keep your data safe**

- Sync log dashboard — see every sync attempt with status, timestamp, and error details
- Automatic retry — transient API failures are retried with exponential backoff so you never silently lose data
- Failure notifications — get alerted in wp-admin when consecutive syncs fail
- Dead-letter queue — permanently failed syncs are preserved with full data for manual retry

**Features that save you time**

- Test sync button — verify your integration works before waiting for real data
- Column auto-creation — auto-detect fields and create sheet headers in one click
- Smart sheet detection — warns you if your sheet is not shared with the service account
- Historical data backfill — export existing users, posts, orders, or comments to your sheet in bulk
- Editable column headers — add, remove, and reorder columns from the integration form
- Conditional logic filters — sync only the events you want with IF/THEN rules (e.g., "only sync orders over $100")

**Integrations**

- WooCommerce — sync orders, products, and status changes
- Contact Form 7 — sync form submissions with automatic field detection

https://www.youtube.com/watch?v=fxGeppjO0Mg

https://www.youtube.com/watch?v=JA3ZUBUQ8CE

== Installation ==

1. Upload the `sheet-wise` folder to `/wp-content/plugins/`, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the Plugins screen.
3. Go to Sheet Wise > Settings and paste your Google Service Account credentials JSON.
4. Go to Sheet Wise > Add New Integration to create your first sync.

== Frequently Asked Questions ==

= How do I get Google Service Account credentials? =

Create a project in the Google Cloud Console, enable the Google Sheets API and Google Drive API, then create a Service Account key. The plugin settings page includes a step-by-step guide, or watch the setup video in the Description section above.

= Do I need to share my Google Sheet with the service account? =

Yes. Copy the service account email from the Sheet Wise settings page and share your Google Sheet with it as an Editor. Sheet Wise will warn you if the sheet has not been shared yet.

= Does it work with WooCommerce? =

Yes. Sheet Wise syncs WooCommerce orders, products, and order status changes. Select any WooCommerce event as your data source when creating an integration.

= Does it work with Contact Form 7? =

Yes. Sheet Wise auto-detects your CF7 forms and their fields. Create an integration with Contact Form 7 as the data source and map your form fields to sheet columns.

= What happens if the Google API is temporarily unavailable? =

Sheet Wise automatically retries failed syncs with exponential backoff (up to 3 attempts by default). If all retries fail, the sync is logged with full error details and preserved in a dead-letter queue for manual retry from the sync log dashboard.

= Can I export existing data that was created before installing the plugin? =

Yes. Use the Historical Data Backfill feature to export existing users, posts, comments, or WooCommerce orders to your Google Sheet in bulk. Records are processed in batches to avoid timeouts.

= Can I test my integration without triggering a real event? =

Yes. Every integration has a Test Sync button that sends sample data to your sheet immediately so you can verify the setup is correct.

= Can I filter which events get synced? =

Yes. Conditional Logic lets you create rules to control what data lands in your sheet. For example, sync only completed orders over $100, or skip test user registrations. Events that don't match your rules are logged as "skipped" in the sync log dashboard.

= What is the minimum PHP version required? =

Sheet Wise requires PHP 8.0 or higher.

== Screenshots ==

1. Add new integration
2. Settings for Sheet Wise

== Changelog ==

= 2.1.0 01-04-2026 =
New - Conditional Logic lets you filter events before they sync to your sheets.

= 2.0.0 26-03-2026 =
* New - Test sync button for instant integration verification
* New - Column auto-creation and smart sheet detection
* New - Automatic retry with exponential backoff and error classification
* New - Editable column headers with add/remove and live sheet sync
* New - Contact Form 7 integration for syncing form submissions
* New - Historical data backfill for exporting existing records
* New - Sync log dashboard with filtering, retry actions, and failure notifications
* Enhance - Redesigned integration form with shared component and clickable field chips
* Enhance - Redesigned HowTo page
* Enhance - Integration list shows Name, WordPress Event, and Google Spreadsheet in single row
* Enhance - Rule name clickable to open edit page
* Fix - Prevent fatal error when WooCommerce handler fires on non-product posts
* Fix - Move error_response() to base REST controller

= v1.1.0 (5 Jan, 2025) =
* Enhance - Added WooCommerce integration

= v1.0.1 (4 Dec, 2024) =
* Enhance - How to page added for Google API setup

= v1.0.0 (30 Nov, 2024) =
* Initial release
* Sync data from WordPress to Google Sheets using various hooks
* User-friendly settings page for API setup and sync management

== Upgrade Notice ==

= 2.0.0 =
Major update with sync log dashboard, automatic retry, Contact Form 7 integration, historical data backfill, and test sync button. No breaking changes.

= 1.0.0 =
