I take advantage of this this strategy to show product retailer hyperlink with [vendor_shop_name] shortcode in customized product web page.
/*Shortcode [vendor_shop_name] https://stackoverflow.com/questions/55364574/display-dokan-vendor-name-and-total-sales-on-woocommerce-single-product-pages*/
add_shortcode('vendor_shop_name', 'vendor_shop_name_function');
perform vendor_shop_name_function() {
world $product;
$vendor = get_post_field('post_author', $product->get_id());
$creator = get_user_by('id', $vendor);
$vendor = dokan()->vendor->get($vendor);
$store_info = dokan_get_store_info($author->ID);
if (!empty($store_info['store_name'])) {
?>
<?php printf('<span class="vendorpage"><a href=" %s">on this retailer</a></span>', $vendor->get_shop_url(), $vendor->get_shop_name()); ?>
<?php
}
}
it really works. However my downside is that retailer hyperlink seem earlier than header. I cannot put it the place I would like. Can anybody assist me please