Working with Woocommerce and Dokan plugin. I am trying to display the vendor name and total sales on the vendor info tab (for customer confidence) on single product pages.
Based on "Display dokan vendor name on Woocommerce single product pages)" question thread, I tried this code to display the vendor name and total sales:
//show vendor total sales
add_action( 'woocommerce_single_product_summary', 'show_total_sales', 20 );
function show_total_sales() {
printf( '<b>Seller Name:</b> <a href="%s">%s</a>', dokan_get_store_url( $author->ID ), $store_info['total_sales'] );
}
But it doesn't work. How can I make it work?