I am using this code to display the relationship on a single post page
$connected = new WP_Query( [
'relationship' => [
'id' => 'opinion-course', // Use the correct relationship ID
'from' => get_the_ID(), // You can pass object ID or full object
],
'nopaging' => true,
] );
while ( $connected->have_posts() ) : $connected->the_post();
?>
<?php the_title(); ?>
<?php
$image = rwmb_meta( 'opinion_logo', [ 'size' => 'thumbnail' ] );
echo '<img loading="lazy" src="' . $image['url'] . '" style="max-height: 80px;">';
?>
<?php
endwhile;
wp_reset_postdata();
how can I display the name of the connected product ? I know we are on the single product page, which means the product name is the connected product, how can I display the name this product inside my query ?
reason is -> i need the name for tippy mouse over