Only sending one post per user to the Discord
-
Having a problem… when a user asks a question the plugin only sends the first question asked by the user to the Discord and fails to send all future questions asked after by the same user, why is it only sending one question from each user to the Discord?
I need it to send all questions even if the user asks multiple questions they must all be sent to the Discord.
Here’s the code
function child_init() {
add_action( ‘publish_question’, array( WP_Discord_Post::instance()->post, ‘send’ ), 10, 2 );
}
add_action( ‘init’, ‘child_init’ );add_filter( ‘wp_discord_post_is_new_post’, ‘wp_discord_post_block_regular_posts’ );
function wp_discord_post_block_regular_posts( $new_post ) {
global $post;if ( $post->post_type !== ‘question’ ) {
return false;
}return $new_post;
}The page I need help with: [log in to see the link]
- The topic ‘Only sending one post per user to the Discord’ is closed to new replies.