Hi there
you can obtain this result by adding the following snippet of code at the end of functions.php file of your theme or child theme
if ( ! function_exists( 'yith_wcwl_print_author_name' ) ) {
function yith_wcwl_print_author_name( $wishlist ) {
/**
* @var YITH_WCWL_Wishlist $wishlist
*/
$user_id = $wishlist->get_user_id();
if ( ! $user_id ) {
return;
}
$user = get_userdata( $user_id );
$first_name = $user->first_name;
$last_name = $user->last_name;
if ( ! $first_name && ! $last_name ) {
return;
}
$complete_name = "{$first_name} {$last_name}";
echo wp_kses_post( sprintf( '<span class="wishlist-owner">by %s</span>', $complete_name ) );
}
add_action( 'yith_wcwl_before_wishlist', 'yith_wcwl_print_author_name', 10, 1 );
}