Hi @kaizerco,
The comments part has nothing to do with IdeaPush as IdeaPush uses the standard WordPress comments – we don’t muck around with this in anyway. So what you are asking is a general WordPress question. However I know you are a pro user and this isn’t a biggie so I am going to provide a snippet below which you can put in your themes functions.php file.
add_action( ‘comment_post’, ‘show_message_function’, 10, 2 );
function show_message_function( $comment_ID, $comment_approved ) {
//wrap the code in the following container if you only want to send the email if the comment is approved
// if( 1 === $comment_approved ){
// //function logic goes here
// }
$comment_id = get_comment( $comment_ID );
$comment_post_id = $comment_id->comment_post_ID;
$get_post_type_from_id = get_post_type( $comment_post_id );
//only proceed if the post type is an idea
if($get_post_type_from_id == ‘idea’){
$emails_to_send_to = array();
//add the admin email to recipients
$options = get_option(‘idea_push_settings’);
$admin_email = $options[‘idea_push_notification_email’];
array_push($emails_to_send_to,$admin_email);
//add the idea author
$post_author_id = get_post_field( ‘post_author’, $comment_post_id );
$post_author = get_user_by(‘id’,$post_author_id);
$post_author_email = $post_author->user_email;
array_push($emails_to_send_to,$post_author_email);
foreach($emails_to_send_to as $notification){
//put your subject here
$subject = ‘A new comment was made on idea: ‘.$comment_post_id;
//put your email content here:
$body = ‘A new comment was made on idea: ‘.$comment_post_id;
//send the email
idea_push_send_email($notification,$subject,$body);
}
}
}
You may want to customise this code as per the comments.
Also as you are a pro customer I do recommend emailing us directly for support as that way I will be able to assist you faster. Thanks