Changeset 3441355
- Timestamp:
- 01/17/2026 02:41:22 AM (3 months ago)
- Location:
- pushrelay/trunk
- Files:
-
- 11 edited
-
CHANGELOG.md (modified) (1 diff)
-
README.md (modified) (4 diffs)
-
includes/class-api-client.php (modified) (3 diffs)
-
includes/class-campaigns.php (modified) (1 diff)
-
includes/class-debug-logger.php (modified) (3 diffs)
-
includes/class-segmentation.php (modified) (1 diff)
-
includes/class-service-worker.php (modified) (2 diffs)
-
includes/class-support-tickets.php (modified) (1 diff)
-
includes/class-woocommerce.php (modified) (2 diffs)
-
pushrelay.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pushrelay/trunk/CHANGELOG.md
r3437249 r3441355 2 2 3 3 All notable changes to PushRelay will be documented in this file. 4 5 ## [1.7.1] - 2026-01-16 6 7 ### Compatibility & Documentation Release 8 9 **PHP 8.2+ Compatibility:** 10 - Fixed deprecation warnings for null passed to string functions 11 - Added null safety guards to: strtoupper, strtolower, str_replace, strpos, substr, strlen, wp_trim_words 12 - Guarded foreach loops against non-array values 13 - No behavior changes — only defensive guards 14 15 **Documentation:** 16 - Improved short description for WordPress.org 17 - Updated support documentation with clear URLs 18 - Added GitHub repository link for transparency 19 20 **Links:** 21 - API Documentation: https://pushrelay.com/api-documentation 22 - Blog: https://pushrelay.com/blog/ 23 - GitHub: https://github.com/pushrelay/pushrelay 24 25 ### Unchanged 26 - No functional changes 27 - No database changes 28 - No API changes 29 - No breaking changes 4 30 5 31 ## [1.7.0] - 2026-01-08 -
pushrelay/trunk/README.md
r3432942 r3441355 1 1 # PushRelay - WordPress Push Notifications Plugin 2 2 3  4  5  6  7 8 ## 🚀 The Most Powerful Push Notifications Plugin for WordPress 9 10 PushRelay is a professional-grade push notifications plugin that rivals OneSignal with advanced features, beautiful UI, and seamless WordPress integration. 3 [](https://wordpress.org/plugins/pushrelay/) 4 [](https://wordpress.org/) 5 [](https://php.net/) 6 [](https://www.gnu.org/licenses/gpl-2.0.html) 7 8 ## 🚀 Reliable Push Notifications for WordPress 9 10 PushRelay is a professional push notifications plugin with advanced features, clean UI, and seamless WordPress integration. 11 12 **WordPress.org:** [https://wordpress.org/plugins/pushrelay/](https://wordpress.org/plugins/pushrelay/) 11 13 12 14 ## ✨ Features … … 74 76 75 77 - **WordPress**: 5.8 or higher 76 - **PHP**: 7.4 or higher (PHP 8. 0+ fully supported)78 - **PHP**: 7.4 or higher (PHP 8.2+ fully supported) 77 79 - **MySQL**: 5.7 or higher 78 80 - **WooCommerce**: 5.0+ (optional, for e-commerce features) 79 81 80 ## 🔄 Version 2.0.1 Updates 81 82 ### Fixed 83 ✅ PHP 8.0+ compatibility issues resolved 84 ✅ Deprecated warnings eliminated 85 ✅ Header output errors fixed 86 ✅ Null value handling improved 87 ✅ Character encoding cleaned (UTF-8 without BOM) 88 89 ### Added 90 ✅ `get_subscriber_stats()` method in Subscribers class 91 ✅ Enhanced null safety checks throughout 92 ✅ Better error handling in all views 93 94 ### Improved 95 ✅ Code quality and consistency 96 ✅ Performance optimizations 97 ✅ Documentation updates 82 ## 🔄 Version 1.7.1 83 84 **PHP 8.2+ Compatibility:** 85 - Fixed deprecation warnings for null passed to string functions 86 - Added null safety guards throughout codebase 87 - No behavior changes 88 89 **Documentation:** 90 - Improved WordPress.org description 91 - Updated support links 92 - Added GitHub repository link 93 94 **No breaking changes. Safe auto-update.** 98 95 99 96 ## 📂 Plugin Structure … … 190 187 ## 📚 Documentation 191 188 192 Full documentation available at: [https://pushrelay.com/docs](https://pushrelay.com/docs) 193 194 ## 🤝 Support 195 196 - **Documentation**: [https://pushrelay.com/docs](https://pushrelay.com/docs) 197 - **Support Tickets**: Create from WordPress admin 198 - **Email**: support@pushrelay.com 189 * **API Documentation**: [https://pushrelay.com/api-documentation](https://pushrelay.com/api-documentation) 190 * **Blog & Tutorials**: [https://pushrelay.com/blog/](https://pushrelay.com/blog/) 191 192 ## 🤝 Support & Contributing 193 194 **Plugin Support:** 195 * WordPress.org support forums (recommended for users) 196 * Built-in ticket system in WordPress dashboard 197 198 **Contributing:** 199 * GitHub Issues for bug reports and feature requests 200 * Pull requests welcome 201 * Please read contributing guidelines first 202 203 **Business Inquiries:** 204 * [Contact Page](https://pushrelay.com/contact) (not for plugin support) 205 206 > **Note:** GitHub Issues are for bug reports and feature requests only, not for general plugin support. For help using the plugin, please use the WordPress.org forums or the built-in ticket system. 199 207 200 208 ## 📄 License … … 218 226 Developed with ❤️ by the PushRelay Team 219 227 220 ## 📊 Stats221 222 - **Total Downloads**: Coming soon 223 - **Active Installations**: Growing daily 224 - **Average Rating**: ⭐⭐⭐⭐⭐ 228 ## 📊 Links 229 230 * **WordPress.org**: [https://wordpress.org/plugins/pushrelay/](https://wordpress.org/plugins/pushrelay/) 231 * **GitHub**: [https://github.com/pushrelay/pushrelay](https://github.com/pushrelay/pushrelay) 232 * **Documentation**: [https://pushrelay.com/api-documentation](https://pushrelay.com/api-documentation) 225 233 226 234 --- 227 235 228 ** Made with passion to compete with OneSignal** 🚀236 **Developed with ❤️ by the PushRelay Team** -
pushrelay/trunk/includes/class-api-client.php
r3437249 r3441355 308 308 } elseif ( $decoded !== null && isset( $decoded['error'] ) ) { 309 309 $error_message .= ': ' . $decoded['error']; 310 } elseif ( ! empty( $body ) ) {311 // Include raw body for debugging (truncated) 310 } elseif ( ! empty( $body ) && is_string( $body ) ) { 311 // Include raw body for debugging (truncated) - guard for PHP 8.2+ 312 312 $error_message .= ' - Response: ' . substr( $body, 0, 200 ); 313 313 } … … 444 444 } 445 445 446 if (empty($websites['data']) ) {446 if (empty($websites['data']) || !is_array($websites['data'])) { 447 447 return new WP_Error('no_websites', __('No websites found in your PushRelay account', 'pushrelay')); 448 448 } … … 452 452 $exact_match = null; 453 453 454 // Guard current_domain for PHP 8.2+ 455 $current_domain = is_string($current_domain) ? $current_domain : ''; 456 454 457 foreach ($websites['data'] as $website) { 455 458 $api_host = isset($website['host']) ? $website['host'] : ''; 456 459 457 // Remove www. for comparison 458 $api_host_clean = str_replace('www.', '', $api_host);460 // Remove www. for comparison - guard for PHP 8.2+ 461 $api_host_clean = str_replace('www.', '', (string) $api_host); 459 462 $current_domain_clean = str_replace('www.', '', $current_domain); 460 463 -
pushrelay/trunk/includes/class-campaigns.php
r3437249 r3441355 384 384 */ 385 385 private function get_post_excerpt($post) { 386 if (!empty($post->post_excerpt)) { 387 return wp_trim_words($post->post_excerpt, 20); 388 } 389 390 return wp_trim_words(strip_shortcodes($post->post_content), 20); 386 // Guard against null for PHP 8.2+ compatibility 387 $excerpt = isset($post->post_excerpt) && is_string($post->post_excerpt) ? $post->post_excerpt : ''; 388 $content = isset($post->post_content) && is_string($post->post_content) ? $post->post_content : ''; 389 390 if (!empty($excerpt)) { 391 return wp_trim_words($excerpt, 20); 392 } 393 394 return wp_trim_words(strip_shortcodes($content), 20); 391 395 } 392 396 -
pushrelay/trunk/includes/class-debug-logger.php
r3437249 r3441355 115 115 // Also log to WordPress debug.log if WP_DEBUG is enabled 116 116 if (defined('WP_DEBUG') && WP_DEBUG) { 117 error_log(sprintf('[PushRelay] [%s] %s', strtoupper($level), $message)); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log 117 // Guard against null for PHP 8.2+ compatibility 118 $level_str = is_string($level) ? strtoupper($level) : 'INFO'; 119 error_log(sprintf('[PushRelay] [%s] %s', $level_str, $message)); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log 118 120 } 119 121 … … 172 174 */ 173 175 private static function is_sensitive_key( $key ) { 176 // Guard against null for PHP 8.1+ compatibility 177 if ( ! is_string( $key ) || $key === '' ) { 178 return false; 179 } 174 180 $key_lower = strtolower( $key ); 175 181 foreach ( self::$sensitive_keys as $sensitive ) { … … 188 194 */ 189 195 private static function looks_like_sensitive_value( $value ) { 196 // Guard against null for PHP 8.1+ compatibility 197 if ( ! is_string( $value ) ) { 198 return false; 199 } 200 190 201 // Skip short values 191 202 if ( strlen( $value ) < 20 ) { -
pushrelay/trunk/includes/class-segmentation.php
r3437249 r3441355 348 348 $filter_url = $filters['subscribed_on_url']; 349 349 350 if (strpos($subscriber_url, $filter_url) === false) { 350 // Guard against null for PHP 8.1+ compatibility 351 $subscriber_url = is_string($subscriber_url) ? $subscriber_url : ''; 352 $filter_url = is_string($filter_url) ? $filter_url : ''; 353 354 if ($filter_url !== '' && strpos($subscriber_url, $filter_url) === false) { 351 355 return false; 352 356 } -
pushrelay/trunk/includes/class-service-worker.php
r3432942 r3441355 136 136 $request_uri = isset($_SERVER['REQUEST_URI']) ? sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])) : ''; 137 137 $request_path = strtok($request_uri, '?'); 138 $request_path = trim($request_path, '/'); 138 // Guard against null/false for PHP 8.1+ compatibility 139 $request_path = is_string($request_path) ? trim($request_path, '/') : ''; 139 140 140 141 // Handle service worker request … … 627 628 $content_type = wp_remote_retrieve_header($response, 'content-type'); 628 629 630 // Guard against null values for PHP 8.1+ compatibility 631 $body = is_string($body) ? $body : ''; 632 $content_type = is_string($content_type) ? $content_type : ''; 633 629 634 // Check for configured service worker 630 635 if ($code === 200 && strpos($body, 'website_id') !== false) { -
pushrelay/trunk/includes/class-support-tickets.php
r3432942 r3441355 212 212 <div class="system-info"> 213 213 <?php foreach ($attachments['system_info'] as $key => $value): ?> 214 <strong><?php echo esc_html(ucwords(str_replace('_', ' ', $key))); ?>:</strong> 214 <?php $key_str = is_string($key) ? $key : ''; // PHP 8.2+ guard ?> 215 <strong><?php echo esc_html(ucwords(str_replace('_', ' ', $key_str))); ?>:</strong> 215 216 <?php 216 217 if (is_array($value)) { -
pushrelay/trunk/includes/class-woocommerce.php
r3432942 r3441355 296 296 $statuses = wc_get_order_statuses(); 297 297 $status_label = isset($statuses['wc-' . $new_status]) ? $statuses['wc-' . $new_status] : ucfirst($new_status); 298 // Guard against null for PHP 8.2+ compatibility 299 $status_label = is_string($status_label) ? $status_label : ''; 298 300 299 301 // Create notification … … 526 528 /* translators: %s: Product name */ 527 529 'title' => sprintf(__('New: %s', 'pushrelay'), $product->get_name()), 528 'description' => wp_trim_words($product->get_short_description(), 15), 530 // Guard against null for PHP 8.2+ compatibility 531 'description' => wp_trim_words((string) $product->get_short_description(), 15), 529 532 'url' => get_permalink($product_id), 530 533 'segment' => 'all', -
pushrelay/trunk/pushrelay.php
r3437249 r3441355 4 4 * Plugin URI: https://pushrelay.com 5 5 * Description: The most powerful push notifications plugin for WordPress. WooCommerce integration, advanced segmentation, automated campaigns, and real-time analytics. 6 * Version: 1.7. 06 * Version: 1.7.1 7 7 * Author: PushRelay 8 8 * Author URI: https://pushrelay.com … … 86 86 87 87 // Define plugin constants 88 define('PUSHRELAY_VERSION', '1.7. 0');88 define('PUSHRELAY_VERSION', '1.7.1'); 89 89 define('PUSHRELAY_DB_VERSION', '1.6.0'); 90 90 define('PUSHRELAY_PLUGIN_DIR', plugin_dir_path(__FILE__)); -
pushrelay/trunk/readme.txt
r3437249 r3441355 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.7. 07 Stable tag: 1.7.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Push notifications for WordPress with WooCommerce integration, segmentation, and analytics.11 Send web push notifications to bring visitors back to your WordPress site. 12 12 13 13 == Description == 14 14 15 PushRelay is the ultimate push notifications solution for WordPress. Send targeted web push notifications to your subscribers with advanced segmentation, automated campaigns, and comprehensive analytics. 16 17 ### 🚀 WHY PUSHRELAY? 18 19 PushRelay goes beyond basic push notifications. It's a complete engagement platform designed to help you connect with your audience in meaningful ways. 20 21 **Better than OneSignal:** 22 * ✅ Automatic Service Worker installation (no FTP needed) 23 * ✅ Deep WooCommerce integration with cart abandonment recovery 24 * ✅ Advanced subscriber segmentation with visual builder 25 * ✅ Real-time analytics and performance insights 26 * ✅ Built-in support ticket system 27 * ✅ API health monitoring with auto-fix 28 * ✅ Native WordPress experience 29 30 ### ⭐ KEY FEATURES 15 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. 16 17 **Requires a free PushRelay account and API key from [pushrelay.com](https://pushrelay.com).** 18 19 = What You Can Do = 20 21 * **Bring visitors back** — Send notifications about new posts, products, or updates 22 * **Recover abandoned carts** — Remind WooCommerce shoppers to complete their purchase 23 * **Announce sales & events** — Time-sensitive notifications reach users instantly 24 * **Automate campaigns** — Trigger notifications when posts are published 25 * **Segment your audience** — Target by device, location, or custom parameters 26 27 = How It Works = 28 29 1. Visitors opt-in to receive notifications (permission-based, no spam) 30 2. You create campaigns from your WordPress dashboard 31 3. Notifications appear on subscribers' devices — even when they're not on your site 32 33 = Key Features = 31 34 32 35 **Smart Campaign Management** … … 122 125 * Privacy policy integration 123 126 124 ### 💡 SUPPORT 125 126 * Built-in ticket system 127 * Automatic log attachment 128 * System information collection 129 * Email support at support@pushrelay.com 130 * Comprehensive documentation 131 * Video tutorials 127 ### 💡 SUPPORT & RESOURCES 128 129 **Plugin Support:** 130 * WordPress.org support forums (recommended) 131 * Built-in ticket system in your WordPress dashboard 132 * Automatic log attachment for faster resolution 133 134 **Documentation:** 135 * [API Documentation](https://pushrelay.com/api-documentation) 136 * [Blog & Tutorials](https://pushrelay.com/blog/) 137 138 **Open Source:** 139 * [GitHub Repository](https://github.com/pushrelay/pushrelay) 140 * Contributions welcome via pull requests 141 * Bug reports via GitHub Issues 142 143 **Business Inquiries Only:** 144 * [Contact Page](https://pushrelay.com/contact) (not for plugin support) 145 146 *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.* 132 147 133 148 ### 🌐 REQUIREMENTS … … 265 280 266 281 == Changelog == 282 283 = 1.7.1 - 2026-01-16 = 284 **Compatibility & Documentation Release** 285 286 * Fixed PHP 8.2+ deprecation warnings 287 * Added null safety guards throughout codebase 288 * Improved short description for WordPress.org 289 * Updated documentation and support links 290 * Added GitHub repository link 291 * No functional changes 292 * No breaking changes 267 293 268 294 = 1.7.0 - 2026-01-08 = … … 360 386 == Upgrade Notice == 361 387 388 = 1.7.1 = 389 Fixed PHP 8.2+ deprecation warnings. Improved documentation. No functional changes. No breaking changes. 390 362 391 = 1.7.0 = 363 392 Campaign status and dashboard widgets now stay in sync automatically. Processing widget updates correctly. No page refresh required. No breaking changes.
Note: See TracChangeset
for help on using the changeset viewer.