Answer the question
In order to leave comments, you need to log in
How to apply this function correctly? To display data in your Woocommerce account?
There is a site on Woocommerce, you need to withdraw the entire amount spent in the client's personal account. How to apply this function correctly?
* Get total spent by customer.
function wc_get_customer_total_spent( $user_id ) {
$customer = new WC_Customer( $user_id );
return $customer->get_total_spent();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question