=== Campaign Bars Pro ===
Tags: announcement bar, woocommerce, targeting, experiments, campaigns
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.3.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The separate Pro add-on for Campaign Bars: store-aware offers, audience rules, recurring hours, local attribution, experiments, and team tools.

== Description ==

Requires Campaign Bars Free 0.3.0 or newer. Pro is distributed separately from the WordPress.org Free package.

* Guided Goal, Offer, Audience, and Publish editor using the same design as Free.
* WooCommerce free-shipping progress from the matching shipping-zone rule, with discount and tax-display handling.
* Coupon application only after WooCommerce confirms eligibility for the current cart.
* Cart minimum/maximum, utm_campaign, selected products/categories, WordPress roles and supported site-language conditions. Page/device scope and exclusions stay mandatory.
* Campaign priorities, recurring days/hours, and overnight schedules in the site timezone.
* Optional source retention for the current browser tab after a matching landing page and explicit analytics consent; a current URL source takes precedence and withdrawal clears the stored source.
* Hide a campaign after its attributed order is paid in the current WooCommerce session.
* Campaign-level reports with names, inclusive site-timezone dates within 90-day retention, views, clicks, attributed paid orders, net product revenue and itemized refunds. Select exactly one attribution window; control groups stay in the experiment report.
* Visibility explanations for priority, AND/OR audience, recurring hours, cart/coupon conditions, paid-order suppression and shipping eligibility. Shipping requires an already available current merchant cart; unknown shopper details remain unknown.
* Native WordPress PHP/JavaScript translation support, using the separate campaign-bars-pro text domain and combined POT template. No translated catalogs are bundled.
* Optional consented local attribution: signed seven-day first-party cookie, 1-day/7-day reporting windows, WooCommerce order CRUD, and itemized refund corrections.
* A/B message/button/color variants, configurable splits and control group, session-stable assignments, planned start/end, and separate report epochs when the offer changes.
* Draft-only editor role, 30 shared brand presets, up to 50 saved draft/publication revisions per campaign, revision-safe draft restore, and reviewed JSON campaign/preset transfer with destination review.

No licensing service, payment checkout, recurring billing, external telemetry, or external script loading is included in this first release. Licensing and pricing have not been configured.

== Installation ==

1. Install or update and activate Campaign Bars Free 0.3.0 or newer before Pro.
2. Upload and activate campaign-bars-pro.zip.
3. Open Campaign Bars. The same editor now includes the Pro controls.
4. Activate WooCommerce if using store-aware offers or purchase reports.
5. Test campaigns on staging before publishing to a live store.

Purge page/CDN caches after installation, updating, or activating/deactivating Pro so cached pages receive the current scripts. Hide-after-purchase applies within the current WooCommerce session, retains at most 100 recent campaigns and 20 unresolved orders per campaign, and keeps a paid state until that campaign's session entry expires or is evicted.

== Frequently Asked Questions ==

= How accurate is shipping progress? =

The plugin uses WooCommerce's matching zone, minimum-order rule, discounts, displayed tax basis, and availability check. It requires a known shipping destination and one shipping package. If eligibility cannot be determined, the campaign hides or shows a neutral fallback message you configured. Coupon-only shipping, split packages, and custom shipping algorithms are not converted into a universal spend target. Test third-party shipping rules on your own store.

= Are purchase reports a claim of sales lift? =

No. Reports attribute eligible paid orders to the last consented campaign click, or control exposure. They aggregate product revenue after discounts, excluding shipping and tax. They are descriptive attribution, not proof of incremental revenue. The control report and visible groups use different exposure/attribution definitions; the plugin does not declare a statistical winner or causal lift.

= Can I compare money across currencies? =

No. Reports hide money for periods containing unverifiable historical currency or a detected store/order currency change, while keeping views, clicks and order counts. Daily totals and an equal preceding-period comparison use only retained dates; the complete comparison period must fit inside the 90-day window. No currency conversion is performed.

= How are refunds handled? =

Itemized product refunds adjust the original measured order-day revenue and record refund amounts. Tax/shipping and non-itemized manual refunds cannot be allocated to product revenue and are not subtracted automatically. Order count remains a count of originally paid orders. Existing measured order metadata prevents repeated payment callbacks from counting the order again.

= Does Pro support WooCommerce order storage? =

It uses WooCommerce order CRUD and declares HPOS compatibility. Exact integration test versions and site-specific launch checks are recorded in the accompanying release report.

= Can Pro push directly to a remote staging site? =

This version exports and imports JSON files, including shared brand presets. Preview the transfer and manually review destination-specific values before creating drafts. It does not connect to or publish on a remote site. Review destination page/product/category IDs, URLs, coupons, roles, language, shipping rules and timezone before publishing.

= What happens when Pro is deactivated? =

Campaigns published with a Pro dependency are skipped while the add-on is unavailable, preventing advanced audience rules from silently disappearing. Data is retained. Free campaigns continue normally.

= What data does attribution store? =

Only when measurement is enabled and explicit analytics consent is granted: a signed cookie containing campaign, variant, time and the current consent-grant reference, valid for seven days; campaign metadata on eligible WooCommerce orders; and local aggregate counters retained for 90 days. No IP, email, or personal customer identity is copied into the analytics tables. Session storage holds experiment assignments. A separate site-scoped consent epoch cookie lasts up to seven days; a denied marker can remain for that period to block late capture. Optional retained landing-source data is bound to the current consent grant in the current browser tab and clears on withdrawal or tab close. Consent revocation clears attribution and retires the browser consent grant so an older late response cannot restore eligible attribution. Prior aggregates and existing order metadata are not erased automatically.

== Changelog ==

= 0.3.0 =
* Require Free 0.3.0 for atomic revisions, safe recovery and shared preview support.
* Correct Goal selection, load experiment results on entry, and bind revision recovery to stable IDs and the current campaign.
* Add selected product/category, role and supported site-language audience conditions.
* Improve native coupon combinations, Blocks checkout attribution and consent-withdrawal handling.
* Add report totals, daily/previous-period comparisons and safeguards for unverifiable currency totals.
* Include brand presets and destination-specific warnings in reviewed staging transfers.

= 0.2.0 =
* Add named campaign reports and date/campaign/attribution filters.
* Explain Pro campaign selection and available WooCommerce shipping rules in the shared visibility check.
* Translate all editor and visitor JavaScript through WordPress wp-i18n.
* Requires Free 0.2.0 for diagnostics, consent setup and the reporting API.

= 0.1.1 =
* Restore experiment assignment before the first public request.
* Preserve purchase suppression across later unpaid and out-of-order checkout attempts.

= 0.1.0 =
* Initial separate Pro add-on.

== Upgrade Notice ==

= 0.3.0 =
Back up before updating. Update Free 0.3.0 before Pro 0.3.0, then clear page/CDN caches. The shared campaign-table migration does not support transparent rollback to 0.2.0.
