I found a way (now use [dokan_store_logo] shortcode anywhere):
function dokan_get_store_logo() {
if ( function_exists( 'dokan_get_store_info' ) ) {
$store_user_id = get_post_field( 'post_author', get_the_ID() );
$store_info = dokan_get_store_info( $store_user_id );
$store_logo_url = ! empty( $store_info['gravatar'] ) ? wp_get_attachment_url( $store_info['gravatar'] ) : wc_placeholder_img_src();return '<img src="' . esc_url( $store_logo_url ) . '" alt="Store Logo" />';
}
}
add_shortcode( 'dokan_store_logo', 'dokan_get_store_logo' );
- This reply was modified 1 minute ago by mesaurabh.