=== ArrayFunnel - Checkout, Upsells & Cart Recovery ===
Contributors: emranio
Tags: woocommerce, side cart, order bump, abandoned cart, checkout
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Requires Plugins: woocommerce
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Convert more WooCommerce visitors into buyers with a side cart, optimized checkout, order bumps, abandoned-cart recovery, and local analytics.

== Description ==

ArrayFunnel adds focused conversion tools to a WooCommerce store. Everything runs on your own
site without an external account. Optional plugin notification preferences can be sent to
ArrayHash when a site administrator saves them in Help or applies Easy Setup.

**Side cart**

A slide-out cart drawer with quantity controls, coupon entry, and an optional free-shipping
progress bar. Three colour accents, two themes, and three corner styles are included, and the
drawer can either open on every add-to-cart or stay out of the way until the shopper opens it.

**Checkout**

An optional countdown display, connection badges on secure checkouts, and low-stock
notices for items already in the cart. Billing and shipping address fields are also put into a
consistent order.

These enhancements, and order bumps, render on the classic checkout — a checkout page built
with the `[woocommerce_checkout]` shortcode. They do not appear on the block checkout. The side
cart, abandoned-cart recovery, and analytics work with either checkout.

**Order bumps**

Offer a single-click add-on on the classic checkout page. Each bump targets all carts, specific
products, specific categories, or a cart-total range, and ships with three display templates.

**Abandoned-cart recovery**

When a shopper types their email at checkout but does not complete the order, ArrayFunnel saves
the cart and can send up to three recovery emails on a schedule you choose. Each email carries a
link that restores the exact cart and can apply a coupon you nominate.

**Analytics**

Checkout views, orders, revenue, average order value, bump acceptance rate, and recovered carts,
all recorded in your own database and shown on a dashboard inside WP Admin.

== Installation ==

1. Install and activate WooCommerce 9.0 or newer.
2. Upload and activate ArrayFunnel.
3. Open **ArrayFunnel** in the WordPress admin menu to configure it.

= Requirements =

* WordPress 6.5 or higher
* PHP 8.0 or higher
* WooCommerce 9.0 or higher
* A classic checkout page (built with the `[woocommerce_checkout]` shortcode) for the checkout
  enhancements and order bumps

== Frequently Asked Questions ==

= Does this plugin send anything to an external service? =

The store features, including analytics and abandoned-cart recovery, run against your own
WordPress database. Recovery emails use your site's mailer. If an administrator saves plugin
notification preferences, ArrayFunnel sends the selected recipient name, email, site URL, site
language, selected topics, plugin name and preference revision to ArrayHash. Viewing Help or
opening Easy Setup alone does not send this data. Turn all three topics off and save to request
removal from plugin notifications.

= What personal data does it store? =

If abandoned-cart recovery is used, the billing email address a shopper types at checkout is
stored, together with the phone number when one is entered and a snapshot of the cart contents.
This is the data needed to send the recovery email and rebuild the cart. Rows older than 90 days
are deleted automatically by a daily scheduled task, and deleting the plugin removes every
ArrayFunnel table, option, and scheduled task. Plugin notification preferences also store the
chosen recipient and topics locally, along with pending delivery state until acknowledged.

= Why do the checkout features not show on my checkout page? =

The checkout enhancements and order bumps hook into the classic checkout. If your checkout page
was built with the Checkout block, replace its contents with the `[woocommerce_checkout]`
shortcode. The side cart, abandoned-cart recovery, and analytics are unaffected and work with
either checkout.

= Can I turn a feature off? =

Yes. The side cart and the checkout enhancements each have their own switch on the Settings
screen, and the countdown and trust badges have their own switches on the Checkout screen.
Order bumps are activated one at a time, so a store with no active bump shows none.
Abandoned-cart tracking only records a cart once a shopper has entered an email address at
checkout.

= How long are analytics kept? =

Indefinitely by default. Set a retention period in days on the Settings screen and a daily
scheduled task will prune anything older.

== External services ==

ArrayHash plugin notifications (optional)

When a site administrator saves notification preferences in Help or applies Easy Setup, the
plugin sends an asynchronous HTTPS request to:
https://user-portal.arrayhash.com/welcome-notification-config/

The request includes the recipient name and email, site URL and language, product name
(arrayfunnel), selected notification topics, and a preference revision used to reject stale
retries. The service records these choices to manage security and release updates, offers,
and ecommerce articles. No shopper, order, cart, payment, or local analytics data is included.

No request is made merely by installing or viewing a page. All topics can be disabled; saving
that choice sends a removal request. Failed requests remain queued and retry with the original
revision until acknowledged, including removal requests. Local saving remains available when
the service is unavailable. The plugin loads no remote scripts, styles, fonts, or images.

== Build instructions ==

Readable PHP, JavaScript, and CSS sources are included in `/src`. The compiled front-end and
admin bundles are in `/public/build`, produced by `@wordpress/scripts` using the bundled
`webpack.config.js`, `postcss.config.js`, and `tailwind.config.js`.

To reproduce the build:

`npm install && npm run build`

To install the PHP autoloader:

`composer install --no-dev --optimize-autoloader`

In the development checkout, `npm run plugin:make` prepares a production build in `zip/plugin`,
and `npm run plugin:zip` builds an installable `zip/arrayfunnel.zip`. These commands use the
normal Composer autoloader; PHP-Scoper is not required. See `docs/releasing.md` in the source
repository for release, copy, artwork, and WordPress.org publishing instructions.

== Changelog ==

= 1.0.1 =
* Added easy setup wizard.
* Added modules page.
* Improved UI.
* Fixed bugs.
