Support » Plugin: Auto Post Scheduler » OneSignal not sending notifications on republishing

  • I used OneSignal to send notifications when a post is published.
    It works when I publish manually, but not with your plugin.

    I use Auto Post Scheduler to recycle old posts.
    In APS, I checked the option “Recycle Posts as New?”
    In OneSignal, under “Automatic Notification Settings”, I checked the option “Automatically send a push notification when I publish a post from 3rd party plugins”.
    However, no notifications are being sent.

    I asked OneSignal and they don’t know what to do about that.

    What should I do?

    • This topic was modified 9 months, 3 weeks ago by stefanolodola.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author johnh10

    (@johnh10)

    According to the OneSignal code, their flag to send post notification is only set if you save the post from the admin screen. Once the post is published and the notification sent, the flag is cleared. So it is not there when APS recycles a post so OneSignal does nothing.

    You can try re-setting the OneSignal flag when APS recycles a post. Something like this code snippet:

    add_filter( 'aps_recycle_post', 'aps_recycle_params', 10, 1 );
    
    function aps_recycle_params( $update ) {
    	update_post_meta($update['ID'], 'onesignal_send_notification', true);
    	return $update;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘OneSignal not sending notifications on republishing’ is closed to new replies.