woocommerce_(order_type)_list_table_order_count filter-hookWC 7.3.0

Allows 3rd parties to modify the count of orders by status.

Usage

add_filter( 'woocommerce_(order_type)_list_table_order_count', 'wp_kama_woocommerce_order_type_list_table_count_filter', 10, 2 );

/**
 * Function for `woocommerce_(order_type)_list_table_order_count` filter-hook.
 * 
 * @param int      $count  Number of orders for the given status.
 * @param string[] $status List of order statuses in the count.
 *
 * @return int
 */
function wp_kama_woocommerce_order_type_list_table_count_filter( $count, $status ){

	// filter...
	return $count;
}
$count(int)
Number of orders for the given status.
$status(string[])
List of order statuses in the count.

Changelog

Since 7.3.0 Introduced.

Where the hook is called

ListTable::count_orders_by_status()
woocommerce_(order_type)_list_table_order_count
woocommerce/src/Internal/Admin/Orders/ListTable.php 628-632
return apply_filters(
	'woocommerce_' . $this->order_type . '_list_table_order_count',
	$count,
	$status
);

Where the hook is used in WooCommerce

Usage not found.