• Resolved hungryforever

    (@hungryforever)


    Hi
    We are using this great plugin in our website, it works great. Now we are trying to integrate this onesignal into our phonegap app, the integration are done without any problem because of your clear documentation. We create tags to do some customization. Now we planned to send the notification for our app users using the tags when the post was create in WordPress. There is any possibilities to do this.

    https://www.ads-software.com/plugins/onesignal-free-web-push-notifications/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hlsg

    (@hlsg)

    I’m interested in this too.

    Plugin Author OneSignal Push Notifications

    (@onesignal)

    Hello Hlsg and hungryforever,

    In our newest WordPress plugin v1.10.2, we now have a filter hook that can be used to modify the object we send to our API. Using this filter, you can customize the notification being sent in almost any way.

    Here’s an example of using the add_filter_hook to send notifications to Android devices and to change the notification’s title. Please see our documentation here for additional parameters: https://documentation.onesignal.com/docs/notifications-create-notification.

    add_filter('onesignal_send_notification', 'onesignal_send_notification_filter', 10, 4);
    function onesignal_send_notification_filter($fields, $new_status, $old_status, $post) {
      $fields['headings'] = array("en" => "my modified title!");
      $fields['isAndroid'] = true;
      return $fields;
    }

    We don’t provide an admin UI option for modifying tags and segments because we decided it would be difficult to accommodate the different use cases and display the options in an easy to use way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Possible to send notifications by tags?’ is closed to new replies.