=== SocialProof X — Sales & Review Notifications ===
Contributors: tapplaza
Donate link: https://tapplazahub.com/socialproof-x
Tags: social proof, woocommerce, sales popup, announcement bar, review notifications
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 5.5.5
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, 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.

Trusted by WooCommerce store owners to build trust, reduce bounce rates, and increase conversions.

= ✅ Free Features (No License Required) =

* **Real WooCommerce notifications** — 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
* **3 entrance animations** — Slide, Fade, Zoom
* **Demo / sample mode** — preview popups on new stores with no orders yet
* **Product image** in every popup
* **Trust badge shortcode** — `[spx_badge]`
* **Views today widget** on product pages
* **Basic analytics** — 7-day traffic, page views, product views, and product clicks
* **CSV review importer**
* **Telegram & WhatsApp review importer**

= 🚀 Pro Features (License Required) =

Upgrade to [SocialProof X Pro](https://tapplazahub.com/socialproof-x) to unlock:

* **Campaign Mode** — Black Friday, Cyber Monday, Flash Sale, Christmas, New Year, Budget Hunt, Custom
* **Announcement Bar** — full-width sticky bar at top or bottom with solid, ticker, or gradient styles
* **Scrolling Ticker** — marquee-style price/product ticker bar
* **Countdown Timer** — live ⏱ 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 their order asking for a review
* **Spend & Win Popup** — reward customers for hitting spend thresholds (e.g. "Spend ₦500k, Win Free Delivery")
* **Upsell Popup** — show a matching product popup after add-to-cart
* **Abandoned Cart Recovery** — detect abandoned carts and send automated reminder emails
* **Live Shoppers widget** — "👀 3 people viewing now" on product pages
* **Sold Today widget** — "🔥 5 sold today" on product pages
* **Trending Products shortcode** — `[spx_trending]`
* **Testimonials Grid shortcode** — `[spx_testimonials]`
* **Full colour customisation** — accent, background, title, subtitle, meta colours
* **Analytics — 30-day history** with interactive chart and top products
* **Sound alerts** on notifications
* **Campaign scheduling** — automatic start and end dates
* **Most Viewed Today** — see which products get the most attention

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

= How It Works =

1. Install and activate — works immediately with WooCommerce
2. Real purchases automatically appear as notifications on your storefront
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 & External Services =

Customer names are anonymised by default (e.g. "A***"). The analytics beacon uses IP anonymisation (last octet removed). Compatible with GDPR, CCPA, and PECR.

**External services used:**

1. **License verification** (Pro only): your license key and site domain are sent to `active.tapplazahub.com` to verify your Pro subscription. No personal customer data is transmitted. [Tapplaza Privacy Policy](https://tapplazahub.com/privacy-policy).

2. **Geo-targeting** (Pro only, only when the geo-targeting feature is enabled by the store admin): the visitor's IP address is sent to `ipinfo.io` to determine their country. The result is cached for 24 hours. If your server uses Cloudflare, no external call is made. [ipinfo.io Privacy Policy](https://ipinfo.io/privacy-policy). You must disclose this in your site's privacy policy if you enable geo-targeting.

== Installation ==

= Automatic Installation =

1. Go to **Plugins → Add New** in your WordPress dashboard
2. Search for **SocialProof X**
3. Click **Install Now** then **Activate**

= Manual Installation =

1. Download the plugin zip file
2. Go to **Plugins → Add New → Upload Plugin**
3. Upload the zip and click **Install Now**
4. Activate through the **Plugins** menu

= After Activation =

1. Go to **SocialProof X → Dashboard**
2. Free features work immediately — no setup required
3. To unlock Pro features, go to **SocialProof X → License** and enter your license key from [tapplazahub.com/socialproof-x](https://tapplazahub.com/socialproof-x)

== Frequently Asked Questions ==

= Does this work without WooCommerce? =

The announcement bar, campaign mode, and shortcodes work on any WordPress site. Real purchase notifications and the Spend & Win popup require WooCommerce.

= Does it slow down my site? =

No. The analytics beacon uses `navigator.sendBeacon()` which is completely non-blocking. All tracking happens asynchronously after the page has fully loaded.

= 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 at your start date.

= How does license verification work? =

Your license key is verified via `active.tapplazahub.com`. Only the key and your site domain are transmitted — no personal data. The result is cached for 12 hours so it has zero impact on store performance. The plugin stays fully active if your license server is temporarily unreachable, so your store is never disrupted.

= Can I use this on multiple sites? =

Each Pro license covers one domain. Visit [tapplazahub.com/socialproof-x](https://tapplazahub.com/socialproof-x) for multi-site plans.

= Does it work with page builders like Elementor? =

Yes. SocialProof X works with Elementor, Divi, Beaver Builder, Gutenberg, and any other page builder since it operates independently at the theme level.

= Is it compatible with WoodMart, Astra, OceanWP? =

Yes. SocialProof X is tested and fully compatible with WoodMart, Astra, OceanWP, Flatsome, Storefront, and all major WooCommerce themes.

= Can I import reviews from CSV? =

Yes. Go to **SocialProof X → Settings → Import** to upload a CSV of reviews. You can also import directly from Telegram or WhatsApp group exports.

= How do I set up the Spend & Win popup? (Pro) =

Go to **SocialProof X → Spend & Win** → enable the feature → set your spending tiers (e.g. "Spend $100 → Free Shipping", "Spend $200 → 10% Discount") → save. The popup appears automatically when a customer adds items to their cart.

= How does Abandoned Cart recovery work? (Pro) =

Go to **SocialProof X → Abandoned Carts** → enable tracking and email reminders → set the delay (1–4 days) → save. When a customer adds items but doesn't checkout, they automatically receive a reminder email after your chosen delay. You can optionally include a comeback discount coupon.

== Screenshots ==

1. Plugin dashboard — live event counters (Total Events, Sales Today, Cart Adds, Reviews Tracked) and quick actions
2. Analytics — interactive 7-day traffic chart with hover tooltips, Most Viewed Today, and daily breakdown table
3. Settings page — general configuration: themes, animations, position, timing, session limits
4. Notification types — enable/disable Sales, Add to Cart, Reviews, Views, and Low Stock popups individually
5. Campaigns — manage Black Friday, Flash Sale, Budget Hunt, and all campaign types in one view
6. Campaign editor — choose type, set price limit, configure bar style, colours, and countdown timer
7. Spend & Win admin — configure spend tiers to reward customers (Pro feature)
8. Spend & Win popup — premium reward popup shown to the customer on the frontend (Pro)
9. Price ticker bar — scrolling product price ticker on the storefront
10. Telegram Import — import customer testimonials directly from Telegram channel or group export

== Changelog ==

= 5.5.5 =
* NEW: "Get SocialProof X Pro" link on the Plugins page for people on the free version (hidden once a license is active).

= 5.5.4 =
* NEW: Abandoned Cart Recovery (Pro) — track carts, send automated reminder emails, optional comeback coupon
* NEW: Interactive analytics chart with hover tooltips (Chart.js, bundled locally)
* NEW: Checkout tracking — "Checkouts Today" KPI card on analytics dashboard
* NEW: Analytics pro gating — free users see 7-day range; Pro unlocks 30-day history
* NEW: Most Viewed Today is now a Pro feature with upgrade prompt for free users
* NEW: Review tracking now fires when admin approves a pending review (not just at submission)
* FIXED: Product Clicks Today now correctly counts clicks from shop/archive/category pages
* FIXED: Review request email hooks always registered; toggling takes effect immediately
* FIXED: Empty email subject field now falls back to default correctly
* FIXED: Remote license deactivation now propagates within 12 hours (transient reduced from 24h)
* FIXED: Plugin action links (Settings, License) now appear on the Plugins page
* IMPROVED: Spend & Win popup redesigned — premium styling, stronger gradients, better shadows
* IMPROVED: All assets (Chart.js) now bundled locally — no external CDN dependencies
* IMPROVED: Full PHP 7.0+ compatibility — no arrow functions required

= 5.5.3 =
* FIXED: Settings, Upsell, Campaigns, and Spend & Win saves now work correctly on WoodMart theme
* FIXED: White space gap below price ticker bar removed
* FIXED: Spend & Win close button now correctly positioned top-right
* FIXED: Campaign announcement bar layout fixed on WoodMart (close button, ticker, CTA)
* NEW: Pre-creates option rows on plugin activation — fixes silent save failures on fresh WoodMart installs
* NEW: Admin checkboxes replaced with custom toggle switches — immune to WoodMart CSS overrides
* IMPROVED: License transient reduced to 12 hours for faster deactivation propagation

= 5.4.2 =
* FIXED: Reward threshold now correctly qualifies customers spending equal to OR above the tier amount
* 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
* NEW: Sticky reward badge — floating badge stays visible after popup closes

= 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

= 5.4.0 =
* SECURITY: Removed hardcoded API secret from plugin source code
* FIXED: License server URL namespace corrected
* NEW: uninstall.php — clean database removal when plugin is deleted
* NEW: languages/.pot file for translators
* IMPROVED: ipinfo.io external service disclosed per WordPress.org guidelines

= 4.0.0 =
* NEW: Campaign Mode — Black Friday, Cyber Monday, Flash Sale, Christmas, New Year, Custom
* NEW: Announcement Bar with countdown timer
* NEW: Exit-intent trigger (Pro)
* NEW: Geo-targeting by country (Pro)
* NEW: Review request email automation (Pro)
* NEW: License system connected to active.tapplazahub.com

= 3.0.0 =
* NEW: Inline product page widgets (views, shoppers, sold today)
* NEW: Trending products shortcode [spx_trending]
* NEW: Site analytics with live visitor count
* NEW: Telegram & WhatsApp review importers
* NEW: 9 popup themes

= 2.0.0 =
* NEW: CSV review importer
* NEW: Testimonials shortcode
* NEW: Demo mode with sample data

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 5.5.4 =
Major update — Abandoned Cart Recovery, interactive analytics chart, improved click tracking, and premium Spend & Win popup. Recommended for all users.

= 4.0.0 =
Major update adding Campaign Mode, Announcement Bar, and Exit-Intent. Existing settings are preserved on upgrade.

