helpful/logs/user_string

With this filter you can control the output of the user in the Helpful logs.

Here in the example we use the string that is stored in the database and not just output 1 or 0.

By default, 1 means that a user string could be created. 0, on the other hand, means that the user string could not be created. Entries with a 0 are deleted during maintenance within Helpful.

The maintenance of Helpful is not affected by your change.

/**
 * @param mixed $user_string
 * @param object $row
 * @return string
 */
add_filter('helpful/logs/user_string', function (mixed $user_string, object $row) {
    $user_string = $row->user;
    return $user_string;
}, 10, 2);

Was this post helpful?

Top