Can someone help me how can i fix this code instead of showing the country it shows the author can you guys tell me what i did wrong on this code?
add_action( 'woocommerce_after_shop_loop_item_title','sold_by' );
function sold_by(){
?>
<?php
global $product;
$seller = get_post_field( 'post_author', $product->get_id());
$author = get_user_by( 'id', $seller );
$store_info = dokan_get_store_info( $author->ID );
$address = dokan_get_store_info( $author->address );
?>
<span class="details">
<?php printf( 'Origin: %s', $author->display_name, $address ); ?>
</span>
<?php
}
See this screenshot showing origin as author instead of country: