• Resolved flymike

    (@flymike)


    When a subscribed-to post is first published, its subscribers get an email. Subsequently, the same post can be returned to Draft status, updated, then (re)published – and subscribers will get another email.

    I’m trying to emulate the subsequent behavior programatically.

    That is, set post_status to Draft and revise content via wp_update_post, then set post_status to Publish and use wp_insert_post(same-post-id) to re-publish. But S2 doesn’t re-send the email to subscribers.

    I also tried wp_transition_post_status(‘draft’,’publish’) – but no emails sent either.

    How to make S2 send emails for a re-published post without resorting to manual manipulation of post?

    • This topic was modified 2 years, 6 months ago by flymike. Reason: clarify wp function calls
Viewing 1 replies (of 1 total)
  • Thread Starter flymike

    (@flymike)

    Answering my own question: the secret is wp_transition_post_status(’publish’, 'draft')

    Just have to get the parameters the right way round…

Viewing 1 replies (of 1 total)
  • The topic ‘programatically updated post does not resend emails’ is closed to new replies.