Show Vendor Avatar/Logo in the single product page
-
I want to show Vendor’s profile picture in the single product page.. if i cant get the function i can show it in the single product page using a short code. need help.
“add_shortcode( ‘dokan_vendor_avatar’, ‘dokan_store_avatar_shortcode’ );
function dokan_store_avatar_shortcode() {
global $product;
$seller = get_post_field( ‘post_author’, $product->get_id());
$author = get_user_by( ‘id’, $seller );
$vendor = dokan()->vendor->get( $seller );$store_info = dokan_get_store_info( $author->ID );
if ( !empty( $store_info[‘store_name’] ) ) { ?>
<span class=”details”>
<?php printf( ‘Sold by: %s‘, $vendor->get_avatar() ); ?>
</span>
<?php
}
}”
This didn’t work. i want to show the avatar of the specific seller in the single product pageThe page I need help with: [log in to see the link]
- The topic ‘Show Vendor Avatar/Logo in the single product page’ is closed to new replies.