• Resolved rytor

    (@rytor)


    Hi there! I am facing an issue I can’t solve. We want the users to make scheduled posts (wordpress editor) and if the posts belong to a certain category then send a notification. We made this change (where categoryname is the slug of the category)

    File: onesignal-admin.php

    if ($posted_from_wordpress_editor) {

    $do_send_notification = ($was_posted && $onesignal_meta_box_send_notification_checked && in_category(‘categoryname’)) ||
    (!$was_posted && $post_metadata_was_send_notification_checked && in_category(‘categoryname’));

    It doesn’t work. If someone publishes a normal post from the specified category (and only from the specified category) it will send the notification. If the post is scheduled, the post will be published on the specified date and time but the notification will never leave unsless someone edits the post and presses update. The original code works for the scheduled posts. Any suggestions?

    Thank you in advance

    • This topic was modified 3 years, 9 months ago by rytor.
    • This topic was modified 3 years, 9 months ago by rytor.
    • This topic was modified 3 years, 9 months ago by rytor.
    • This topic was modified 3 years, 9 months ago by rytor.
    • This topic was modified 3 years, 9 months ago by rytor.
    • This topic was modified 3 years, 9 months ago by rytor.
    • This topic was modified 3 years, 9 months ago by rytor.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Scheduled posts + Specific category’ is closed to new replies.