=== PushRelay - Push Notifications ===
Contributors: pushrelay
Tags: push notifications, web push, notifications, marketing, engagement
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.7.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send web push notifications to bring visitors back to your WordPress site.

== Description ==

PushRelay lets you send web push notifications to your WordPress visitors. Use it to announce new content, recover abandoned carts, and keep your audience engaged — all without requiring email addresses.

**Requires a free PushRelay account and API key from [pushrelay.com](https://pushrelay.com).**

= What You Can Do =

* **Bring visitors back** — Send notifications about new posts, products, or updates
* **Recover abandoned carts** — Remind WooCommerce shoppers to complete their purchase
* **Announce sales & events** — Time-sensitive notifications reach users instantly
* **Automate campaigns** — Trigger notifications when posts are published
* **Segment your audience** — Target by device, location, or custom parameters

= How It Works =

1. Visitors opt-in to receive notifications (permission-based, no spam)
2. You create campaigns from your WordPress dashboard
3. Notifications appear on subscribers' devices — even when they're not on your site

= Key Features =

**Smart Campaign Management**
* Manual campaigns with rich media support
* Scheduled campaigns with timezone support
* Automated campaigns triggered by events
* A/B testing capabilities
* RSS to Push notifications
* Drip campaigns

**Advanced Segmentation**
* Filter by location (country, city, continent)
* Device type (mobile, desktop, tablet)
* Browser and operating system
* Custom parameters
* Engagement metrics
* Subscription date
* WooCommerce purchase history

**WooCommerce Integration**
* Cart abandonment recovery
* Back in stock notifications
* Price drop alerts
* New product announcements
* Order status updates
* Customer segmentation by purchase behavior
* Revenue tracking

**Analytics & Reporting**
* Real-time dashboard
* Click-through rates (CTR)
* Display rates
* Conversion tracking
* Subscriber growth charts
* Campaign performance comparison
* Export to CSV
* Performance scoring

**Developer Friendly**
* Comprehensive REST API integration
* Multiple shortcodes for easy integration
* WordPress hooks and filters
* Debug mode with detailed logging
* System health monitoring
* Documented codebase

### 🎯 PERFECT FOR

* **E-commerce stores** - Recover abandoned carts and boost sales
* **News & Media sites** - Instant content delivery to readers
* **Bloggers** - Keep readers engaged with new posts
* **Membership sites** - Important updates and announcements
* **Event organizers** - Time-sensitive notifications
* **SaaS platforms** - Product updates and feature releases

### 🛠️ SETUP IN MINUTES

1. Install and activate the plugin
2. Enter your PushRelay API key
3. The plugin auto-detects your website configuration
4. Service worker installs automatically
5. Start sending notifications!

No coding required. No FTP access needed. Everything works out of the box.

### 📊 SHORTCODES

Make push notifications part of your content with these easy shortcodes:

* `[pushrelay_subscribe]` - Add a subscribe button anywhere
* `[pushrelay_count]` - Display subscriber count
* `[pushrelay_stats]` - Show statistics
* `[pushrelay_widget]` - Full subscription widget
* `[pushrelay_status]` - Subscription status indicator
* `[pushrelay_health_score]` - System health score

### 🎨 CUSTOMIZATION

* Visual widget customization
* Custom CSS support
* Template system for notifications
* Branding options
* Multiple language support
* RTL support

### 🔒 PRIVACY & SECURITY

* GDPR compliant
* No data stored without consent
* Secure API communication
* Opt-in/opt-out management
* IP anonymization options
* Privacy policy integration

### 💡 SUPPORT & RESOURCES

**Plugin Support:**
* WordPress.org support forums (recommended)
* Built-in ticket system in your WordPress dashboard
* Automatic log attachment for faster resolution

**Documentation:**
* [API Documentation](https://pushrelay.com/api-documentation)
* [Blog & Tutorials](https://pushrelay.com/blog/)

**Open Source:**
* [GitHub Repository](https://github.com/pushrelay/pushrelay)
* Contributions welcome via pull requests
* Bug reports via GitHub Issues

**Business Inquiries Only:**
* [Contact Page](https://pushrelay.com/contact) (not for plugin support)

*Note: For plugin support, please use the WordPress.org forums or the built-in ticket system. GitHub Issues are for bug reports and feature requests, not general support.*

### 🌐 REQUIREMENTS

* WordPress 5.8 or higher
* PHP 7.4 or higher
* HTTPS (SSL certificate required for push notifications)
* PushRelay account (free signup available)

### 🆓 FREE FEATURES

* Unlimited subscribers
* Unlimited campaigns
* Basic analytics
* Manual notifications
* Email support

### 💎 PREMIUM FEATURES

* Advanced segmentation
* WooCommerce integration
* Automated campaigns
* A/B testing
* Priority support
* Advanced analytics
* Custom integrations

== Installation ==

### Automatic Installation

1. Log in to your WordPress dashboard
2. Navigate to Plugins → Add New
3. Search for "PushRelay"
4. Click "Install Now" and then "Activate"
5. Follow the setup wizard

### Manual Installation

1. Download the plugin zip file
2. Log in to your WordPress dashboard
3. Navigate to Plugins → Add New → Upload Plugin
4. Choose the zip file and click "Install Now"
5. Activate the plugin
6. Follow the setup wizard

### Configuration

1. After activation, you'll be redirected to the setup wizard
2. Enter your PushRelay API key (get one free at pushrelay.com)
3. The plugin will auto-detect your website
4. Select your website from the list
5. The service worker will be installed automatically
6. You're ready to send notifications!

### Getting Your API Key

1. Sign up for free at [pushrelay.com](https://pushrelay.com)
2. Create a new website in your dashboard
3. Copy your API key from Settings → API
4. Paste it into the WordPress plugin settings

== Frequently Asked Questions ==

= Do I need a PushRelay account? =

Yes, you need a free PushRelay account to use this plugin. Sign up at [pushrelay.com](https://pushrelay.com).

= Is HTTPS required? =

Yes, web push notifications require HTTPS. Make sure your site has a valid SSL certificate installed.

= Will this work with WooCommerce? =

Absolutely! We have deep WooCommerce integration including cart abandonment, back in stock alerts, price drops, and order status notifications.

= Can I customize the subscription prompt? =

Yes, you can fully customize the widget design, text, colors, and positioning through the plugin settings or via your PushRelay dashboard.

= How many subscribers can I have? =

There's no limit on subscribers. You can have unlimited subscribers on all plans.

= Does it work on mobile devices? =

Yes! Push notifications work on both desktop and mobile devices (Android Chrome, Firefox, Safari 16.4+).

= Can I send notifications automatically? =

Yes, you can set up automated notifications for new posts, WooCommerce events, and custom triggers.

= Is the service worker installed automatically? =

Yes! Unlike other plugins, PushRelay automatically installs and manages the service worker. No FTP access needed.

= Can I test notifications before sending? =

Yes, you can send test notifications to yourself before sending to all subscribers.

= What analytics are available? =

You get comprehensive analytics including sends, displays, clicks, CTR, subscriber growth, device breakdown, and geographic data.

= Can I segment my subscribers? =

Yes, you can create unlimited segments based on location, device, browser, custom parameters, engagement, and WooCommerce data.

= Does it slow down my site? =

No, the plugin is highly optimized and uses caching. The service worker loads asynchronously and doesn't impact page speed.

= Can I export subscriber data? =

Yes, you can export subscribers and analytics to CSV format.

= Is there a limit on notifications? =

Limits depend on your PushRelay plan. Check [pushrelay.com/pricing](https://pushrelay.com/pricing) for details.

= How do I get support? =

Use the built-in ticket system (PushRelay → Support) or email support@pushrelay.com. Premium users get priority support.

== Screenshots ==

1. Dashboard - Overview of all your statistics and recent campaigns
2. Campaign Builder - Create beautiful notifications with images and buttons
3. Subscriber Management - View and segment your subscribers
4. Analytics - Detailed insights into campaign performance
5. WooCommerce Integration - Cart abandonment and automated notifications
6. Health Check - Monitor your plugin's health and API connectivity
7. Segmentation Builder - Create targeted subscriber segments visually
8. Settings - Easy configuration with auto-detection

== Changelog ==

= 1.7.3 - 2026-01-16 =
**Changelog Correction**

* Corrected changelog entries for 1.7.0-1.7.2 releases
* No functional changes in this release
* No breaking changes

= 1.7.2 - 2026-01-16 =
**PHP 8.2+ Compatibility & Documentation**

* Fixed PHP 8.2+ deprecation warnings (null passed to string functions)
* Added null safety guards to string functions throughout codebase
* Improved WordPress.org plugin description
* Updated documentation and support links
* Added GitHub repository link
* No breaking changes

= 1.7.1 - 2026-01-16 =
**Campaign UX Polish**

* Campaign status now auto-refreshes without page reload
* Dashboard widgets update automatically when campaign status changes
* Processing widget shows/hides correctly based on active campaigns
* Success notices auto-dismiss after 5 seconds
* Fixed widgets not updating after campaign creation
* No breaking changes

= 1.7.0 - 2026-01-08 =
**Campaign Status Polling & Widget Sync**

* Added live campaign status polling (20-second interval)
* Campaigns in processing/queued status auto-update to terminal state
* Polling stops automatically when all campaigns reach terminal status
* Dashboard stats widgets sync with table data in real-time
* Campaign list updates immediately after creation
* Auto-generated campaigns display with "auto" badge and tooltip
* Improved database query safety (prepared statements)
* Rate limit detection with automatic 60-second backoff
* API request retry logic for transient failures
* Sensitive data redaction in debug logs
* Internal diagnostics for support troubleshooting
* No breaking changes
* Safe upgrade from 1.6.x

= 1.6.3 - 2026-01-08 =
* Fixed: Campaigns list requiring manual refresh after creation
* Campaign list now updates automatically
* No user action required
* No breaking changes

= 1.6.2 - 2026-01-07 =
**Internal Improvements Only**

* Internal: Added diagnostic export for support troubleshooting
* Internal: Reduced log retention to prevent unbounded growth
* Internal: Added automatic redaction of sensitive data in logs
* Internal: Added API rate limit detection with automatic backoff
* Internal: Added cron overlap prevention for queue processing
* Internal: Detects and clears stale locks from stuck jobs

No user-visible changes. No database changes. No breaking changes.

= 1.6.1 - 2026-01-07 =
**Maintenance Release**

* Fixed: Log level classification for API responses (404 now NOTICE, 5xx remains ERROR)
* Fixed: Database error when queue table has legacy schema
* Fixed: Missing parameter validation before certain API requests
* Improved: Retry logic for transient API failures on read-only requests
* Improved: Graceful handling for malformed JSON responses
* Improved: Backward compatibility with older database installations
* Internal: Added diagnostic methods for troubleshooting

No user interface changes. No database schema changes. No breaking changes.

= 1.6.0 - 2024-12-22 =
**Major Update - Complete Rewrite**

**NEW:**
* Automatic service worker generation and installation
* WooCommerce deep integration (cart abandonment, back in stock, price drops)
* Advanced segmentation with visual builder
* Real-time analytics dashboard
* Built-in support ticket system
* API health monitoring with auto-fix
* Debug logging system
* Shortcodes for easy integration
* Automated campaign triggers
* Queue system for reliable delivery
* Export to CSV functionality
* System health scoring

**IMPROVED:**
* Complete code refactoring for WordPress standards
* Enhanced security with nonce verification
* Better error handling and user feedback
* Optimized database queries with caching
* Mobile-responsive admin interface
* Comprehensive logging and debugging
* Better API error messages

**FIXED:**
* Service worker installation issues
* Campaign scheduling bugs
* Subscriber count accuracy
* Memory optimization
* Compatibility with latest WordPress

= 1.5.0 - 2024-06-15 =
* Initial WordPress.org release
* Basic push notification functionality
* Simple campaign management
* Basic analytics

== Upgrade Notice ==

= 1.7.3 =
Changelog correction only. No functional changes. No breaking changes.

= 1.7.2 =
PHP 8.2+ compatibility fixes. Documentation improvements. No breaking changes.

= 1.7.1 =
Campaign UX improvements. Auto-refresh and widget sync fixes. No breaking changes.

= 1.7.0 =
Live campaign status polling and dashboard widget sync. No breaking changes.

= 1.6.3 =
Campaign list now updates automatically after creation. No manual refresh needed. No breaking changes.

= 1.6.2 =
Internal improvements only. Better logging, diagnostics, and reliability. No user-visible changes. Safe upgrade.

= 1.6.1 =
Safe maintenance update. Improves logging and API resilience. No database changes. No breaking changes.

= 1.6.0 =
Major update with WooCommerce integration, advanced segmentation, automated campaigns, and much more. Automatic upgrade from 1.5.0 - your settings will be preserved.

== Privacy Policy ==

PushRelay takes your privacy seriously:

**Data Collection:**
* Subscriber endpoint (required for push notifications)
* Device information (browser, OS, device type)
* Geographic data (country, city - optional)
* Custom parameters (optional, set by you)

**Data Usage:**
* Send push notifications
* Analytics and reporting
* Segmentation
* Service improvement

**Data Sharing:**
* Data is stored on PushRelay servers
* Not sold to third parties
* Used only for notification delivery

**User Rights:**
* Users can unsubscribe anytime
* Data deletion requests honored
* GDPR compliant

For full privacy policy, visit [pushrelay.com/privacy](https://pushrelay.com/privacy)

== Additional Info ==

**Links:**
* [Website](https://pushrelay.com)
* [Documentation](https://docs.pushrelay.com)
* [Support](https://support.pushrelay.com)
* [API Documentation](https://pushrelay.com/api-docs)
* [Privacy Policy](https://pushrelay.com/privacy)
* [Terms of Service](https://pushrelay.com/terms)

**Connect:**
* [Twitter](https://twitter.com/pushrelay)
* [Facebook](https://facebook.com/pushrelay)
* [YouTube](https://youtube.com/pushrelay)

**Contribute:**
This plugin is open source. Contributions are welcome!
* [GitHub Repository](https://github.com/pushrelay/wordpress-plugin)

== Credits ==

Created by the PushRelay team with ❤️

Special thanks to:
* All our beta testers
* WordPress community
* WooCommerce team
* Chart.js for beautiful charts