wc_get_customer_order_count( int $user_id )
Get total orders by customer.
Description Description
Parameters Parameters
- $user_id
-
(Required) User ID.
Return Return
(int)
Source Source
File: includes/wc-user-functions.php
function wc_get_customer_order_count( $user_id ) {
$customer = new WC_Customer( $user_id );
return $customer->get_order_count();
}