=== Vivid Marketing ===
Contributors: vividsystems
Tags: woocommerce, email marketing, newsletter, abandoned cart, banners
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.2
Stable tag: 1.1.5
License: GPL-2.0-or-later

Email and WhatsApp campaigns, scheduled website banners and abandoned-cart recovery for WooCommerce — customer list imports and opt-in forms, with unsubscribes honoured everywhere.

== Description ==

Send proper HTML emailers from your own store — a banner, your specials, your
buy-now-pay-later options, your latest articles and your busiest categories —
swap your website's specials banner every month without touching the page, and
chase the carts people leave behind.

**Weekly or monthly emailers.** Duplicate last month's campaign, change the
products, schedule it. Products fill themselves in from the store when the email
goes out — on-sale items, products you pick by ID or SKU, a category, best
sellers — with sale prices struck through, an instalment line and a button on
every card.

**Scheduled banners, on the website and in the email.** Load next month's
specials banner any time; it goes live on its start date wherever you placed
`[vivid_banner slot="specials"]`, with a separate phone-sized image if you want
one, and the page cache is cleared so visitors actually see it. A campaign set
to "this month's banner" carries whichever banner is live on the day it sends.

**New subscribers get this month's emailer.** When someone ticks the marketing
box at checkout or registration (or uses the signup form), they are sent the
current campaign once, about a minute later.

**Opt-in forms and existing customer imports.** People can sign up through:

* an unticked marketing box at checkout (classic and block checkout),
  registration and My Account;
* the `[vivid_signup]` form for any page or footer;
* contacts you add or import after confirming they agreed.

Every consent is stored with its date, source, IP address and the exact wording.
Customers without an opt-in remain unconfirmed until an administrator uses
Contacts > Add existing customers. This enrolment is recorded separately from
customer consent, preserves opt-outs, and does not send a welcome email.

**WhatsApp campaigns.** Send your specials to customers who ticked the separate
WhatsApp box, using a Meta-approved template — with this month's banner as the
header image and their first name filled in. Uses the connection already set up
in Vivid WhatsApp. A "STOP" reply or Meta's "Stop promotions" button opts them
out straight away (via the webhook URL shown in Settings).

**Opens and clicks.** Each campaign shows how many people opened it and clicked.
Links are signed, so the tracking can never be used to redirect anyone elsewhere,
and the unsubscribe link is never tracked. Every email also carries a plain-text
version.

**Payment options come from the calculator.** If Vivid Payment Calculator is
installed, the instalment providers in your emails are the same ones on your
product pages — one list to maintain, not two.

**Abandoned carts.** For shoppers who opted in — including those who ticked the
box at checkout but did not finish — the basket is remembered and up to three
reminders go out on your schedule, with a one-click link that puts it back.
Everything stops the moment they order.

**Unsubscribes are respected, properly.** Every marketing email carries an
unsubscribe link and the `List-Unsubscribe` headers Gmail and Outlook use for
their own button. One click removes them. After that:

* they are never sent another marketing email by this plugin;
* a WooCommerce sync, a CSV import or the public signup form will not re-add them;
* the check runs again as each batch sends, so someone who opts out mid-campaign
  is dropped from the remainder;
* only the person themselves can opt back in;
* uninstalling keeps the suppression list, so a reinstall cannot email them.

== Frequently Asked Questions ==

= How does it send? =

Through WordPress, in batches on a background schedule, optionally via your own
SMTP server (Settings → Sending server). Use a mailbox on your own domain —
marketing sent from a free mailbox lands in spam.

= What happened to customers synced in 1.0? =

1.0 subscribed every buyer. On upgrade, buyers and cart shoppers with no
recorded consent become "No consent yet" — kept, not deleted, and not emailed
until they opt in. Contacts you added by hand are left as they were.

= Does it handle bounces? =

Addresses can be marked as bounced and are then treated exactly like an
unsubscribe. Automatic bounce processing is not included yet.

== Changelog ==

= 1.1.5 =
* Full-width website banners now line their text up with the theme's content column (logo and page content) instead of a fixed 5% from the screen edge.

= 1.1.4 =
* Add existing WooCommerce customers in batches, preserving opt-outs and without sending welcome campaigns.
* Include working unsubscribe links and headers in test emails.
* Campaign link click totals, recipient activity, unsubscribe attribution and failure details.
* Optional full-width coloured email header.
* Restore composed scheduled banners without background images.

= 1.1.3 =
* Prevent sideways banner overflow across theme layouts and viewport changes.
* Claim campaign recipients atomically to prevent overlapping workers sending twice.
* Interrupted deliveries are flagged for review instead of automatically retried.

= 1.1.0 =
* Explicit consent: marketing box at classic and block checkout, registration
  and My Account; [vivid_signup] form; consent evidence on every contact;
  WooCommerce sync takes only opted-in buyers; attested manual add and import.
* Campaign scheduling, duplication, and a welcome send of the current emailer
  to new subscribers.
* Scheduled banners with [vivid_banner], mobile images, priorities and
  automatic page-cache purge; "this month's banner" in emails.
* Redesigned emails: link bar, intro panel, product cards with buttons and
  instalment line, highlight band, second product section, payment-logo strip,
  category tiles.
* WhatsApp campaigns: separate WhatsApp opt-in (checkout, My Account, signup
  form), Meta template sending with banner header and personalised variables,
  STOP-reply webhook with signature check, approved-template picker.
* Open and click tracking (signed links, no open redirect) with rates per
  campaign; plain-text alternative on every email.
* Abandoned carts only for opted-in shoppers; editable wording and a preview
  per reminder; prices stored as numbers; variations restored correctly.
* The plugin now bundles its framework (1.0 did not load without another Vivid
  plugin active). The campaign preview text now actually reaches the inbox.

= 1.0.0 =
* First release: campaigns, contact list, CSV import, WooCommerce sync,
  abandoned-cart recovery, one-click unsubscribe with a permanent suppression
  list.
