Send to Telegram gets disabled by status changes
-
Our site has a publishing process where posts go through a publishing queue. Something in the process turns off the “Send to Telegram” setting. Here’s how the process works:
1. Post is written and saved as
pending
to wait for approval.
2. Editor checks the post and saves it asspq_queued
, a custom status.
3. Our scheduler picks up the post from the queue, changes the post status tofuture
and sets thepost_date
.Step 3 seems to turn off the “Send to Telegram” setting. Here’s what it does:
$updated_post = array( 'ID' => $post_id, 'post_status' => 'future', 'post_date' => date( 'Y-m-d h:i:s', $timestamp ), 'post_date_gmt' => date( 'Y-m-d h:i:s', $timestamp - $gmt_offset ), 'edit_date' => true, ); return wp_update_post( $updated_post );
Why does this turn off the setting? I suppose I can run the
wp_update_posts()
and, after that, set thesend2tg
custom field back toyes
, but I’d also like to understand why this disables the setting. It shouldn’t, so maybe there’s a bug in the plugin?
- The topic ‘Send to Telegram gets disabled by status changes’ is closed to new replies.