wc_get_customer_total_spent()
Get total spent by customer.
No Hooks.
Returns
String.
Usage
wc_get_customer_total_spent( $user_id );
- $user_id(int) (required)
- User ID.
wc_get_customer_total_spent() wc get customer total spent code WC 10.6.2
function wc_get_customer_total_spent( $user_id ) {
$customer = new WC_Customer( $user_id );
return $customer->get_total_spent();
}