Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'woocommerce_single_product_summary', 'seller_name_on_single', 11 );
- function seller_name_on_single(){
- 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 );
- if ( !empty( $store_info['store_name'] ) ) { ?>
- <span class="details">
- <?php printf( 'Sold by: <a href="%s">%s</a>', dokan_get_store_url( $author->ID ), $author->display_name ); ?>
- </span>
- <?php
- }
- }
- ?>
Add Comment
Please, Sign In to add comment