=== SocialProof X — Sales & Review Notifications ===
Contributors: tapplaza
Tags: social proof, sales notification, woocommerce, popup, announcement bar
Requires at least: 5.8
Tested up to: 6.9.4
Requires PHP: 7.4
Stable tag: 5.4.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Complete social proof suite for WooCommerce: real purchase popups, live counters, Black Friday announcement bars, campaign mode, exit-intent and more.

== Description ==

**SocialProof X** is the most complete social proof plugin for WooCommerce. Show real-time purchase notifications, run Black Friday campaigns with scrolling announcement bars, display live viewer counts on product pages, and automate review request emails — all from one plugin.

= Free Features =

* Real WooCommerce sale, add-to-cart, and review popups
* Low stock alert popups — "🔥 Only 3 left!"
* View counter popups — "X people viewed today"
* 9 popup themes: Modern, Dark, Glass, Gradient, Neon, Compact, Bubble, Bar, Minimal Pro
* 3 entrance animations: Slide, Fade, Zoom
* Demo/sample mode for new stores
* Product image in popup
* Trust badge shortcode `[spx_badge]`
* Views today widget on product pages
* Basic analytics — 7 days
* CSV review importer
* Telegram & WhatsApp review importer

= Pro Features =

* **Campaign Mode** — Black Friday, Cyber Monday, Flash Sale, Christmas, New Year, Custom
* **Announcement Bar** — full-width sticky bar at top or bottom of every page
* **Scrolling Ticker** — marquee-style scrolling text bar
* **Gradient Shimmer** bar style
* **Countdown Timer** — live ⏱ 02:14:33 countdown in bar and popup
* **Exit-Intent Trigger** — fire popup when visitor is about to leave
* **Geo-Targeting** — show notifications only to visitors from specific countries
* **Review Request Email** — auto-email buyers X days after order asking for a review
* **Live Shoppers widget** — "👀 3 people viewing now" on product pages
* **Sold Today widget** — "🔥 5 sold today" on product pages
* **Trending Products** — `[spx_trending]` shortcode
* **Testimonials Grid** — `[spx_testimonials]` shortcode
* **Full colour customisation** — accent, background, title, subtitle, meta
* **Analytics 30-day history** with top products chart
* **Sound alerts** on notifications
* **Campaign scheduling** — automatic start and end dates

[Get SocialProof X Pro →](https://tapplaza.com/socialproof-x)

= How It Works =

1. Install and activate — works immediately with WooCommerce
2. Real purchases automatically appear as notifications on your store
3. Create campaigns for Black Friday, flash sales, or any promotion
4. Add the announcement bar to any page — visitors see it instantly
5. Track results in the built-in analytics dashboard

= Shortcodes =

* `[spx_badge]` — aggregate trust badge with star rating
* `[spx_testimonials limit="6" min_rating="4"]` — customer review grid
* `[spx_trending limit="5"]` — trending products by views
* `[spx_views]` — views today for current product
* `[spx_shoppers]` — live shoppers on current product
* `[spx_sold]` — sold today for current product

= Privacy =

Customer names are anonymised by default (A*** format). The analytics beacon uses IP anonymisation (last octet removed). Compatible with GDPR. No data is sent to external servers except as described below.

External services used by this plugin:

1. **License verification** (Pro only): performed via `active.tapplaza.com`. Only the license key and site domain are transmitted. See [Tapplaza Privacy Policy](https://tapplaza.com/privacy-policy).

2. **Geo-targeting** (Pro only, when geo-targeting is enabled): visitor country is looked up via `ipinfo.io` using the visitor's IP address. The IP is cached for 24 hours and never stored permanently. If your server uses Cloudflare, no external call is made at all. See [ipinfo.io Privacy Policy](https://ipinfo.io/privacy-policy). You must disclose this to your visitors in your site's privacy policy if you enable geo-targeting.

== Installation ==

1. Upload the `socialproof-x` folder to `/wp-content/plugins/`
2. Activate through the **Plugins** menu in WordPress
3. Go to **SocialProof X → Dashboard** to get started

== Frequently Asked Questions ==

= Does this work without WooCommerce? =
The announcement bar, campaign mode, and shortcodes work on any WordPress site. Real purchase notifications require WooCommerce.

= How do I create a Black Friday campaign? =
Go to **SocialProof X → Campaigns** → click **New Campaign** → choose **Black Friday** preset → set your dates and message → save. The bar and popup go live automatically.

= How does license verification work? =
Your license key is verified securely via active.tapplaza.com. Only the license key and your site domain are transmitted — no personal data. Results are cached for 24 hours with no performance impact.

= Can I use this on multiple sites? =
Each Pro license covers one domain. Check tapplaza.com/socialproof-x for multi-site plans.

== Screenshots ==

1. Plugin dashboard — quick actions and live event counters
2. Announcement bar live on site — Flash Sale with countdown timer and CTA button
3. Review notification popup — live 5-star review with product image
4. Free features overview — campaign presets included at no cost
5. Pro features overview — scrolling ticker, gradient bar, budget hunt, and more
6. Campaign editor — type, schedule, discount, CTA, and bar settings
7. Analytics dashboard — real-time traffic, page views, and product intelligence

== Changelog ==

= 5.4.2 =
* FIXED: Reward threshold now correctly qualifies customers spending equal to OR above the tier amount (e.g. ₦120k qualifies for ₦100k tier)
* FIXED: "Continue Shopping" button now goes to the Shop page instead of Checkout
* FIXED: Cart total detection now works for Cash-on-Delivery and session-based carts (WC session fallback)
* NEW: Sticky reward badge — small floating badge stays visible after popup closes, showing the customer their current reward; bumps/updates automatically when they hit a higher tier; clicking it re-opens the popup

= 5.4.1 =
* PRO: Spend & Win Reward Popup is now a Pro-only feature
* PRO: Free users see a feature overview/upgrade page in the admin menu
* PRO: Save settings, Setup Wizard, and all frontend popup rendering gated behind active Pro license
* IMPROVED: Version bumped to 5.4.1

= 5.4.0 =
* SECURITY: Removed hardcoded API secret from plugin source code
* FIXED: License server URL namespace corrected
* IMPROVED: Version numbers unified across plugin header, constants, and readme
* IMPROVED: Tested up to WordPress 6.9
* NEW: uninstall.php — clean database removal when plugin is deleted
* NEW: languages/.pot file for translators
* NEW: ipinfo.io external service disclosed per WordPress.org guidelines
* IMPROVED: Pro-locked settings (Re-display After, Bar Height, Mobile Font Size) now enforced server-side
* IMPROVED: Inline countdown removed from bar message — only the dark-background timer shows

= 4.0.0 =
* NEW: Campaign Mode — Black Friday, Cyber Monday, Flash Sale, Christmas, New Year, Custom
* NEW: Announcement Bar — sticky top/bottom bar with solid, scrolling ticker, and gradient shimmer styles
* NEW: Countdown timer in bar and popup
* NEW: Exit-intent trigger (Pro)
* NEW: Geo-targeting by country (Pro)
* NEW: Review request email automation (Pro)
* NEW: License system connected to active.tapplaza.com
* NEW: Star ratings displayed in review notifications
* NEW: Campaign popup mixed into regular notification queue
* NEW: Branding link — "by Tapplaza" on all popups
* IMPROVED: Demo names and locations now global (English-speaking cities worldwide)
* IMPROVED: Frontend JS rewritten — exit-intent, campaign fallback, better sound
* FIXED: All Nigeria-specific demo defaults replaced with global data

= 3.0.0 =
* Added inline product page widgets (views, shoppers, sold today)
* Added trending products shortcode [spx_trending]
* Added site analytics with live visitor count
* Added Telegram & WhatsApp review importers
* Added 9 popup themes

= 2.0.0 =
* Added CSV review importer
* Added testimonials shortcode
* Added demo mode with sample data

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 4.0.0 =
Major update — Campaign Mode, Announcement Bar, and Exit-Intent added. Existing settings are preserved.
