dokan_author_total_sales( int $seller_id)

Description #

Get total sales amount of a seller for the orders with  ‘wc-completed’, ‘wc-processing’ and ‘wc-on-hold’ statuses.

Parameters #

(int) (required) $seller_id Seller id.

Return #

(float) Total sales amount for the seller.

Hooks #

dokan_seller_total_sales (Filter hook)

Usage #

$total_sales_amount = dokan_author_total_sales();

if ( ! empty( $total_sales_amount ) ) {
    // do something
} else {
    // do something else
}

Leave a Reply

Your email address will not be published. Required fields are marked *