@deepblue5
I searched for a “Dokan” shortcode but found a “Dokan” function being said to work for your product list.
You can try this code snippet, install into your active theme’s functions.php file
or use the “Code Snippets” Plugin:
add_filter( 'um_profile_tabs', 'um_dokan_tab_add_tab', 1000 );
add_action( 'um_profile_content_dokan_tab_default', 'um_profile_content_dokan_tab', 10, 1 );
function um_dokan_tab_add_tab( $tabs ) {
$tabs[ 'dokan_tab' ] = array(
'name' => 'Products',
'icon' => 'um-faicon-list',
'custom' => true
);
UM()->options()->options[ 'profile_tab_' . 'dokan_tab' ] = true;
return $tabs;
}
function um_profile_content_dokan_tab( $args ) {
echo '<div class="um">';
if( function_exists( 'dokan_get_more_products_from_seller' )) {
echo esc_html( 'Products from this vendor:' );
dokan_get_more_products_from_seller( um_profile_id(), $posts_per_page = 10 );
} else {
echo esc_html( 'DOKAN function not found.' );
}
echo '</div>';
}