=== Cordlo Connect ===
Contributors: cordlo
Tags: woocommerce, invoicing, crm, sync, bookings
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Plugin URI: https://link.cordlo.com/cordlo-connect

Sync WooCommerce orders and LatePoint bookings to Cordlo as invoices with automatic customer and payment tracking.

== Description ==

Cordlo Connect bridges your WordPress site with Cordlo, a professional invoicing and client management platform. Orders, bookings, customers, and payments are automatically synced into Cordlo — eliminating repetitive manual data entry.

Cordlo Connect helps businesses streamline operations by automatically converting WooCommerce orders and booking data into professional invoices inside Cordlo.

Perfect for agencies, service providers, appointment-based businesses, and online stores.

== Requirements ==

* WordPress 6.8+
* PHP 8.1+
* Active Cordlo workspace
* WooCommerce (optional)
* LatePoint (optional)

== Supported Integrations ==

* WooCommerce — every new or updated order creates or updates an invoice in Cordlo, including line items, shipping, fees, coupons, billing and shipping addresses, and payment method.
* LatePoint — bookings sync as invoices, including service extras, agent, location, and customer notes.

More integrations will be added in future releases.

== Features ==

* Real-time sync on order and booking creation or update
* Automatic customer creation and updates with email-based deduplication
* Automatic payment entry when invoices are marked as paid
* Bulk sync tool to import historical WooCommerce orders
* Product sync — push your WooCommerce catalogue to Cordlo so invoice line items link to real products for accurate reporting
* Activity log for viewing sync events, retries, errors, and statuses
* Automatic retry handling for failed sync attempts
* Lightweight and modular architecture
* Works even if WooCommerce or LatePoint is not installed

== Installation ==

1. Upload the `cordlo-connect` folder to `/wp-content/plugins/`.
2. Activate the plugin from **Plugins → Installed Plugins**.
3. Go to **Cordlo Connect → Settings**.
4. Enter your API Key, Workspace Code, and Business Code from your Cordlo workspace.
5. Click **Test Connection** to verify your credentials.
6. Optionally go to **Cordlo Connect → Sync Products** and click **Sync Products to Cordlo** to push your WooCommerce catalogue — this links invoice line items to real products for accurate reporting.
7. Optionally run a one-time **Bulk Sync** from **Cordlo Connect → Bulk Sync** to import existing WooCommerce orders.

== Frequently Asked Questions ==

= Where do I find my API Key and Business Code? =

Log in to your Cordlo workspace and navigate to **Settings → API Keys**. Your Workspace Code and Business Code are available in the same section.

= Does this work without WooCommerce? =

Yes. If WooCommerce is not active, the WooCommerce integration is skipped automatically. The plugin will still load normally and other integrations will continue to work.

= Does this work without LatePoint? =

Yes. The LatePoint integration is only loaded when LatePoint is installed and active.

= What happens if a sync fails? =

Failed sync attempts are logged in the **Activity Log** page. Failed records are automatically retried on the next relevant update event.

= Is customer data secure? =

Customer data is transmitted securely over HTTPS to the Cordlo API. API credentials are securely stored within your WordPress installation and are only used for communication with your Cordlo workspace.

= Can I sync historical WooCommerce orders? =

Yes. Use **Cordlo Connect → Bulk Sync** to import existing WooCommerce orders in batches. New orders sync automatically once the plugin is configured.

= Will bulk sync create duplicate invoices? =

No. Previously synced records are detected automatically to help prevent duplicate invoice creation.

= What does the Product Sync do? =

**Cordlo Connect → Sync Products** pushes your published WooCommerce products to Cordlo. Once synced, every invoice line item is linked to the matching Cordlo product, giving you accurate sales and product reporting. You can re-run the sync at any time to pick up new or updated products.

= Do I need to sync products before placing orders? =

No, orders will still sync as invoices even if you have not run a product sync. Product sync is optional but recommended — it unlocks product-level reporting in Cordlo.

== External Services ==

This plugin connects to the Cordlo API to sync WooCommerce orders, LatePoint bookings, customers, products, and payments into your Cordlo workspace.

**Service:** Cordlo — a professional invoicing and client management platform.
**Endpoint:** https://secure.cordlo.com/

**What data is sent and when:**

* **Connection test** — When you click "Test Connection" on the Settings page, your API Key, Workspace Code, and Business Code are sent to verify your credentials. No order or customer data is transmitted.
* **Order sync** — When a WooCommerce order is created or updated, the order's billing details, line items, shipping, fees, coupons, payment method, and status are sent to create or update the corresponding invoice in Cordlo.
* **Booking sync** — When a LatePoint booking is created or updated, booking details including service, extras, agent, location, customer information, and notes are sent to Cordlo.
* **Customer sync** — Customer name, email, phone, and address are sent alongside each order or booking sync to create or update the customer record in Cordlo.
* **Bulk sync** — When you run the Bulk Sync tool, existing WooCommerce orders and their associated customer and payment data are sent to Cordlo in batches.
* **Product sync** — When you run Sync Products, your published WooCommerce product names, SKUs, descriptions, and prices are sent to Cordlo.

Data is only transmitted when these actions occur and only to `https://secure.cordlo.com/`. No data is shared with any other third party.

* [Cordlo Terms of Service](https://cordlo.com/terms-of-service/)
* [Cordlo Privacy Policy](https://cordlo.com/privacy-policy/)

== Support ==

Need help or want to report an issue?

Visit [Cordlo Connect](https://link.cordlo.com/cordlo-connect) or email us at support@cordlo.com.

== Changelog ==

= 1.0.0 =

* Initial release.
* WooCommerce real-time order sync including line items, shipping, fees, coupons, addresses, and payment method.
* LatePoint booking sync including service extras, agent, location, and customer notes.
* Historical WooCommerce bulk sync for importing existing orders.
* Product sync — push your WooCommerce catalogue to Cordlo in bulk for linked invoice line items and product-level reporting.
* Activity log with sync history and error tracking.
* Automatic customer upsert and payment synchronization.

== Upgrade Notice ==

= 1.0.0 =

Initial release.