• Resolved laurentlg

    (@laurentlg)


    Hello,

    I’ve encountered an issue with the WP Telegram plugin where posts that are set to ‘Privately Published’ with ‘Visibility: Private’ in WordPress are still being shared to Telegram. This behavior occurs regardless of the post’s privacy settings in WordPress, leading to unintended sharing of private content.

    Could you please advise on whether this is a known issue and if there are any settings that I might need to adjust to prevent private posts from being shared? Additionally, any guidance on a workaround or an upcoming fix would be appreciated.

    Thank you for your assistance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Irshad Ahmad

    (@irshadahmad21)

    Hello

    That is the intended behaviour because private posts are still published posts. We have many users who use it to send those private posts to their private groups and channels.

    However, if you want that private posts should not be sent to Telegram, you can use this little snippet:

    /* WP Telegram - do not send private posts */
    add_filter(
      'wptelegram_p2tg_valid_post_statuses',
      function ( $statuses ) {
    
        $key = array_search( 'private', $statuses['live'] );
    
        if ( false !== $key ) {
          unset( $statuses['live'][ $key ] );
        }
    
        return $statuses;
      }
    );

    You can add that snippet to functions.php of your child theme.

    Thread Starter laurentlg

    (@laurentlg)

    Cool, thanks for your quick answer and for the code snippet.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP Telegram Plugin Shares Privately Published Posts to Telegram’ is closed to new replies.