woocommerce_customer_get_order_count filter-hook . WC 3.0.0
Return the number of orders this customer has.
Usage
add_filter( 'woocommerce_customer_get_order_count', 'filter_function_name_5724' ); function filter_function_name_5724( $customer ){ // filter... return $customer; }
- $customer
- -
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
woocommerce_customer_get_order_count
woocommerce/includes/data-stores/class-wc-customer-data-store.php 368-372
$count = apply_filters( 'woocommerce_customer_get_order_count', get_user_meta( $customer->get_id(), '_order_count', true ), $customer );