secretuser
Forum Replies Created
-
I write a code myself:
I put this in functions.php and it worked!/////////////////////////////////
// Add a delay of 10 minutes ////
/////////////////////////////////add_filter(‘onesignal_send_notification’, ‘onesignal_send_notification_filter’, 10, 4);
function onesignal_send_notification_filter($fields, $new_status, $old_status, $post)
{
$date = new DateTime();
$date->modify(“+1 hours”);
$date->modify(“+10 minutes”);
$senddate = $date->format(‘M d Y H:i:s’).’ ‘ .’GMT+0100’;
$fields[‘send_after’] = $senddate;
return $fields;
}
////////////////////////////Something like this:
<?php
add_filter(‘onesignal_send_notification’, ‘onesignal_send_notification_filter’, 10, 4);function onesignal_send_notification_filter($fields, $new_status, $old_status, $post)
{
// Schedule the notification to be sent after 10 minutes
$date = new DateTime();
$date->modify(“+10 minutes”);
// echo $date->format(‘Y-m-d H:i:s’);
$fields[‘send_after’] = $date;
return $fields;
}
?>Forum: Reviews
In reply to: [OneSignal - Web Push Notifications] Doesn’t work after update 2.0.1Thanks, I’ve upgraded to 2.0.2 and the bug is fixed. It works!
Forum: Reviews
In reply to: [OneSignal - Web Push Notifications] Latest Version not workingThanks, I’ve upgraded to 2.0.2 and the bug is fixed. It works!
Forum: Reviews
In reply to: [OneSignal - Web Push Notifications] Version 2.0.1 Fixed with New ReleaseThanks, I’ve upgraded to 2.0.2 and the bug is fixed. It works!
Forum: Reviews
In reply to: [OneSignal - Web Push Notifications] Doesn’t work after update 2.0.1I downgraded to 2.0.0. After a few days, I will try to install 2.0.2
Forum: Reviews
In reply to: [OneSignal - Web Push Notifications] Doesn’t work after update 2.0.1Error after save post:
“OneSignal Push: Did not receive a response status from last notification sent”This problems occurs after de update 2.0.1 (today)
Forum: Reviews
In reply to: [OneSignal - Web Push Notifications] Not workError after save post:
“OneSignal Push: Did not receive a response status from last notification sent”This problems occurs after de update 2.0.1 (today)