Limit Review replies

This topic contains 4 replies, has 2 voices, and was last updated by  Stiofan O’Connor 7 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #397053

    Joy
    Buyer
    Post count: 1076

    Hello, I found this topic which was really awesome: https://wpgeodirectory.com/support/topic/reply-to-review-settings/

    However, can we somehow expand this so that the original comment poster can also reply? That way, the only people in the conversation will be the OP and the listing owner. If this can be implemented I plant to limit the reply count to level two so it doesn’t get ridiculous. But if possible it would be something like this:

    OP: Bad experience, very unhappy.
    Listing Owner: I’m sorry about this, please contact me so we can fix it.
    OP: Owner made things right. Happy.

    If this is too difficult, that’s fine. I just thought it might be cool to implement.

    #397212

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Joy,

    We try to implement what will work for the majority of people, if other features are in high demand we will add them, things like this would tend to fall under customisation, it would not be too difficult to have it work exactly how you want but it would require a few filters and some custom code, i think that might be your best option to get what you want.

    Thanks,

    Stiofan

    #397219

    Joy
    Buyer
    Post count: 1076

    Hi Stiofan,

    I understand. This might be something to consider though. Without comment limitations a review could turn into a forum-type grievance soundboard. For now I’ll just use the custom code that I found, at least it limits it a bit.

    Thank you.

    #398198

    Joy
    Buyer
    Post count: 1076

    If anyone is looking to implement this, I’ve figured it out. Adding the following code snippet will allow a reviewer and a post author to reply to one another. I have limited to 3 levels(initial comment, reply from post author, and follow up comment). You limit the levels in the threaded(nested) comments settings under “Discussions” in your WordPress settings.

    
    
    /* Reply comment only allowed by post author */
    add_filter( 'comment_reply_link', 'author_comment_reply', 10, 4 );
    function author_comment_reply( $link, $args, $comment, $post ) {
    	if ( isset( $post->post_author ) && $post->post_author ) {
    		$user_ID = get_current_user_id();
    		if ( $user_ID == $post->post_author ) {
    			return $link;
    		}
    
    		// reviewer can reply to post author's reply
    		if($comment->comment_parent) {
    			$parent_comment = get_comment($comment->comment_parent);
    			if ($user_ID == $parent_comment->user_id) {
    				return $link;
    			}
    		}
    	}
    	return '';
    }
    #398239

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Thanks for sharing 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount