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 );
}
Awesome! Worked like a charm!
You’re welcome
We are doing our best to improve our plugins. Our target is to develop and release the best free plugins for WooCommerce, but to achieve this we need your help. Please leave a good review to support us and help our growth 🙂