• Resolved knubew

    (@knubew)


    I put this code snippet from your FAQ into the functions.php file, but is has no effekt. Where exactly should the value of ‘display_name’ appear in the mail response that the person who wote the response receives?

    /**
     * @param string $responseBy
     * @param \GeminiLabs\SiteReviews\Review $review
     * @return string
     */
    add_filter('site-reviews/review/build/tag/response/by', function ($responseBy, $review) {
        // Option 1:
        // The user ID of the person who wote the response is stored to the review,
        // so you can get their name like this:
        if ($user = get_userdata($review->meta()->_response_by)) {
            $responseBy = $user->display_name;
        }
        return $responseBy;
    }, 10, 2);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the name in the response – Not working?’ is closed to new replies.