wc_get_customer_order_count()
Get total orders by customer.
Хуков нет.
Возвращает
int
.
Использование
wc_get_customer_order_count( $user_id );
- $user_id(int) (обязательный)
- User ID.
Код wc_get_customer_order_count() wc get customer order count WC 9.4.2
function wc_get_customer_order_count( $user_id ) { $customer = new WC_Customer( $user_id ); return $customer->get_order_count(); }