Display Vendor Logo on product page
-
Hello,
We know, that we can display the vendor shop name with this code below. But how can we display the vendor logo? I guess we can reuse that code with different properties?
Original code from: https://nayemdevs.com/display-vendor-name/
Cheers
add_action( 'woocommerce_single_product_summary','sold_by_store_name', 5 ); function sold_by_store_name(){ ?> </a> <?php 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="SellerDetailsProductSinglePageLable"> <?php printf( '<a>%s</a>', $vendor->get_shop_name() ); ?> </span> <?php } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Display Vendor Logo on product page’ is closed to new replies.