=== ReDock CRM Sync ===
Contributors: redock
Tags: crm, email marketing, users, sync, woocommerce
Requires at least: 5.6
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Keeps your WordPress users in sync with ReDock CRM contacts in real time.

== Description ==

ReDock CRM Sync sends user changes from your site to ReDock CRM as they happen:

* New registrations (including WooCommerce customers)
* Profile updates (name and email changes)
* Role changes (ReDock tags contacts with their roles, e.g. `wp:subscriber`)
* Deleted users (ReDock removes them from the list, unsubscribes or deletes them — you choose in ReDock)

Every request is signed with HMAC-SHA256 using a secret only your site and ReDock know. Failed deliveries are retried automatically every 5 minutes. A "Sync all users now" button sends your existing users in batches of 200.

The plugin is optional: ReDock can also import users on a schedule with a WordPress Application Password. The plugin adds instant updates on top of that.

== Installation ==

1. In ReDock, open Settings → Integrations and connect your WordPress site.
2. On the site's page in ReDock, open "Real-time sync", download this plugin and copy the connection key.
3. In WordPress, go to Plugins → Add New → Upload Plugin, upload the zip and activate it.
4. Go to Settings → ReDock CRM, paste the connection key and click Connect.
5. Optionally click "Sync all users now" to send existing users.

== Frequently Asked Questions ==

= What data is sent? =

User id, username, email, first and last name, display name, roles, registration date and website URL. Passwords are never sent.

= What if ReDock is unreachable? =

Events are kept in a small queue (up to 500) and retried every 5 minutes with backoff for up to 10 attempts. ReDock ignores duplicates, so retries are safe.

= Does it work without WP-Cron? =

Real-time events are sent at the end of each request. Retries and "Sync all users now" batches use WP-Cron; if you disabled WP-Cron, run `wp cron event run --due-now` from a system cron.

== Changelog ==

= 1.0.0 =
* First release.
