=== M Cart Recovery for WooCommerce ===
Contributors: mcartrecovery
Tags: woocommerce, abandoned cart, cart recovery, email marketing, mailwizz
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 10.0
WC tested up to: 10.9
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Recover unfinished WooCommerce orders with a first-add email gate, scheduled email sequences, recoverable carts, reports, and optional MailWizz sync.

== Description ==

M Cart Recovery is a lightweight WooCommerce extension that:

* Requests an email before the shopper's first add-to-cart action.
* Stores the email in the WooCommerce customer session and prefills checkout.
* Marks inactive carts abandoned after a configurable delay.
* Sends up to three configurable recovery reminders with secure restore links.
* Restores product variations and quantities directly into checkout.
* Shows cart, email, conversion, and recovered-revenue reports.
* Syncs explicitly opted-in contacts to MailWizz 2.x services such as 1e.lt.
* Exposes a standard WordPress action for additional marketing integrations.
* Integrates with the WordPress personal-data exporter, eraser, and privacy-policy guide.

The plugin uses WooCommerce CRUD and session APIs, declares HPOS and Cart/Checkout Block compatibility, and uses Action Scheduler when available with a WP-Cron fallback.

== Installation ==

1. Upload the `m-cart-recovery` directory to `/wp-content/plugins/`, or install the ZIP through Plugins > Add New.
2. Activate WooCommerce.
3. Activate M Cart Recovery.
4. Open WooCommerce > Cart Recovery > Settings.
5. Set the abandonment delay, sender details, storefront dialog copy, and retention period.
6. Review the default email sequence under Email templates.
7. Optionally connect MailWizz under Integrations.

For reliable timing on low-traffic stores, configure a real server cron to request `wp-cron.php` regularly.

== Frequently Asked Questions ==

= Does it work with High-Performance Order Storage? =

Yes. Order matching uses WooCommerce order objects and the extension declares HPOS compatibility.

= Does it work with block-based Cart and Checkout? =

Yes. The captured billing email is saved through the WooCommerce customer object, which is shared with the Store API, and compatibility is declared for Cart and Checkout Blocks.

= Is marketing consent required? =

Recovery reminders and marketing sync are handled separately. A contact is sent to MailWizz only when the shopper explicitly selects the optional marketing consent checkbox.

= How can another email platform be connected? =

Listen to `mcr_customer_email_captured`. The callback receives the email and a boolean marketing-consent value. Integrators are responsible for syncing only when that consent value is true.

= Is data removed when I delete the plugin? =

Not by default, which prevents accidental loss during a reinstall. Enable the permanent uninstall cleanup option under Settings before uninstalling if all tables and settings should be deleted.

== Changelog ==

= 1.1.2 =
* Fixed: an update that could not be downloaded now says why. WordPress gives a package download five minutes to finish, which is longer than any host allows a single admin request to run, so when the connection to majevski.com stalled the request was cut off before WordPress could report anything and the Plugins screen showed only the browser's own "Connection lost or the server is busy". Downloads of this plugin's releases are now capped at sixty seconds — far more than a release archive needs, and short enough that the real transport error is reported on the screen instead of the request dying silently.
* New: a Site Health check under Tools → Site Health → Status, "M Cart Recovery for WooCommerce can reach its update server". It makes the same two calls the installer makes — the release manifest, then the package itself — and prints the exact error when either fails, so a blocked outbound connection is named as such instead of appearing as a failed update.

= 1.1.1 =
* Fixed: new releases now appear on the Plugins screen within an hour instead of up to a day. WordPress only re-checks for updates every 12 hours by default and the release manifest was cached for another 12 — visiting the Plugins screen now forces a fresh check (at most hourly), and the manifest cache lasts one hour.
* New: a "Check for updates" link in this plugin's row on the Plugins screen — click it and, if a newer release exists, the native "update now" link is active immediately.

= 1.1.0 =
* New: automatic update checks against majevski.com. When a newer release is published, WordPress shows its standard update prompt with one-click install; a "View details" popup shows the changelog. The update channel is pinned to https://majevski.com over HTTPS, checks are cached and fail open, and equal or older versions are never offered.

= 1.0.0 =

* Initial release.
* Added accessible first-add email capture.
* Added abandonment detection and recovery email sequence.
* Added secure cart restoration and reminder opt-out.
* Added cart list and 30-day reports.
* Added MailWizz 2.x integration and third-party integration hook.
* Added HPOS, Cart/Checkout Blocks, translation, and WordPress privacy support.

== Upgrade Notice ==

= 1.1.0 =
Adds self-hosted update checks: from this version on, new releases appear in the normal WordPress update flow. Install this version manually once — older versions do not know about the update channel yet.

