• Resolved loopforever

    (@loopforever)


    Hello,

    This code(below) censors the name and surname of customers who comment on products. Only the first letter of the name and surname is displayed. Several stars appear in the following. However, this code does not work in Store Page>Comments. So, the customers’ name and surname appear exactly. What should I add for the Dokan store page ?

    add_filter('get_comment_author', 'my_comment_author', 10, 1);
    function my_comment_author( $author = '' ) {
    // Get the comment ID from WP_Query
    $comment = get_comment( $comment_ID );
    if (!empty($comment->comment_author) ) {
    if($comment->user_id > 0){
    $user=get_userdata($comment->user_id);
    $author = mb_substr($user->first_name, 0, 1, 'UTF-8').'***'.' '.mb_substr($user->last_name, 0, 1, 'UTF-8').'***';
    } else {
    $author = mb_substr($user->first_name, 0, 1, 'UTF-8').'***'.' '.mb_substr($user->last_name, 0, 1, 'UTF-8').'***';
    }
    } else {
    $author = $comment->comment_author;
    }
    
    return $author;
    }
    • This topic was modified 4 years, 6 months ago by loopforever.
    • This topic was modified 4 years, 6 months ago by loopforever.
Viewing 1 replies (of 1 total)
  • Hello @loopforever ,

    Are you referring to store reviews that come with Dokan Pro? We are unable to discuss paid module’s feature here. Please contact our support channel using the email that you used to buy the Dokan plugin.

    Also, we are unable to complete the customization request but we will share our file location and reference codes if available.

    Thanks for using Dokan ??

    Regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Review Problem’ is closed to new replies.