I am trying to display the related product which is related to the post author since I only want to show products or the product that was created by the same user
global $post;
$authorid = $post->post_author;
foreach ( $related_products as $related_product ) :
$post_object = get_post( $related_product->$authorid );
setup_postdata( $GLOBALS['post'] =& $post_object );
wc_get_template_part( 'content', 'product' );
endforeach;
however it doesn't show anything