OneSignal – Free Web Push Notifications - Version 1.17.1

Version Description

  • Support for more detailed error messages
Download this release

Release Info

Developer OneSignal
Plugin Icon 128x128 OneSignal – Free Web Push Notifications
Version 1.17.1
Comparing to
See all releases

Code changes from version 1.17.0 to 1.17.1

Files changed (4) hide show
  1. notice.js +1 -1
  2. onesignal-admin.php +5 -4
  3. onesignal.php +1 -1
  4. readme.txt +7 -2
notice.js CHANGED
@@ -68,7 +68,7 @@ jQuery(document).ready(function() {
68
 
69
  // status 0: HTTP request failed
70
  if (status_code == 0) {
71
- error_notice("OneSignal Push: HTTP request failed");
72
  reset_state();
73
  return;
74
  }
68
 
69
  // status 0: HTTP request failed
70
  if (status_code == 0) {
71
+ error_notice("OneSignal Push: request failed. "+error_message);
72
  reset_state();
73
  return;
74
  }
onesignal-admin.php CHANGED
@@ -803,10 +803,11 @@ public static function uuid($title) {
803
 
804
  $response = wp_remote_post($onesignal_post_url, $request);
805
 
806
- if ( is_wp_error($response) || !is_array( $response ) || !isset( $response['body']) ) {
807
- $status = $response->get_error_code(); // custom code for WP_ERROR
808
- error_log("There was a ".$status." error returned from OneSignal");
809
- update_post_meta($post->ID, "error_message", $response->get_error_message());
 
810
  return;
811
  }
812
 
803
 
804
  $response = wp_remote_post($onesignal_post_url, $request);
805
 
806
+ if ( is_wp_error($response) || !is_array( $response ) || !isset( $response['body']) ) {
807
+ $status = $response->get_error_code(); // custom code for WP_ERROR
808
+ $error_message = $response->get_error_message();
809
+ error_log("There was a ".$status." error returned from OneSignal: ".$error_message);
810
+ update_post_meta($post->ID, "error_message", $error_message);
811
  return;
812
  }
813
 
onesignal.php CHANGED
@@ -6,7 +6,7 @@ defined( 'ABSPATH' ) or die('This page may not be accessed directly.');
6
  * Plugin Name: OneSignal Push Notifications
7
  * Plugin URI: https://onesignal.com/
8
  * Description: Free web push notifications.
9
- * Version: 1.17.0
10
  * Author: OneSignal
11
  * Author URI: https://onesignal.com
12
  * License: MIT
6
  * Plugin Name: OneSignal Push Notifications
7
  * Plugin URI: https://onesignal.com/
8
  * Description: Free web push notifications.
9
+ * Version: 1.17.1
10
  * Author: OneSignal
11
  * Author URI: https://onesignal.com
12
  * License: MIT
readme.txt CHANGED
@@ -3,8 +3,9 @@ Contributors: OneSignal
3
  Donate link: https://onesignal.com
4
  Tags: chrome, firefox, safari, push, push notifications, push notification, chrome push, safari push, firefox push, notification, notifications, web push, notify, mavericks, android, android push, android notifications, android notification, mobile notification, mobile notifications, mobile, desktop notification, roost, goroost, desktop notifications, gcm, push messages, onesignal
5
  Requires at least: 3.8
6
- Tested up to: 5.0.3
7
- Stable tag: 1.17.0
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -65,6 +66,10 @@ HTTPS Setup Video: [youtube https://www.youtube.com/watch?v=BeTZ2KgytC0]
65
 
66
  == Changelog ==
67
 
 
 
 
 
68
  = 1.17.0 =
69
 
70
  - Bug fixes, edge-case handling, refactoring
3
  Donate link: https://onesignal.com
4
  Tags: chrome, firefox, safari, push, push notifications, push notification, chrome push, safari push, firefox push, notification, notifications, web push, notify, mavericks, android, android push, android notifications, android notification, mobile notification, mobile notifications, mobile, desktop notification, roost, goroost, desktop notifications, gcm, push messages, onesignal
5
  Requires at least: 3.8
6
+ Tested up to: 5.1
7
+ Stable tag: 1.17.1
8
+
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
66
 
67
  == Changelog ==
68
 
69
+ = 1.17.1 =
70
+
71
+ - Support for more detailed error messages
72
+
73
  = 1.17.0 =
74
 
75
  - Bug fixes, edge-case handling, refactoring