get vendor total sales woocommerce
// Get products by vendor/author
$products = wc_get_products( array(
'status' => 'publish',
'limit' => -1,
'author' => $store_user->get_id()
) );
// Total sales
$total_sales = array();
foreach( $products as $product ) {
$total_sales[] = $product->get_total_sales();
}
echo array_sum( $total_sales );