woocommerce_(order_type)_list_table_should_render_blank_state
Whether we should render a blank state so that custom count queries can be used.
Usage
add_filter( 'woocommerce_(order_type)_list_table_should_render_blank_state', 'wp_kama_woocommerce_order_type_list_table_should_render_blank_state_filter', 10, 2 ); /** * Function for `woocommerce_(order_type)_list_table_should_render_blank_state` filter-hook. * * @param null $should_render_blank_state `null` will use the built-in counts. Sending a boolean will short-circuit that path. * @param object $that ListTable The current instance of the class. * * @return null */ function wp_kama_woocommerce_order_type_list_table_should_render_blank_state_filter( $should_render_blank_state, $that ){ // filter... return $should_render_blank_state; }
- $should_render_blank_state(null)
- null will use the built-in counts. Sending a boolean will short-circuit that path.
- $that(object)
- ListTable The current instance of the class.
Changelog
Since 8.6.0 | Introduced. |
Where the hook is called
woocommerce_(order_type)_list_table_should_render_blank_state
woocommerce/src/Internal/Admin/Orders/ListTable.php 650-654
$should_render_blank_state = apply_filters( 'woocommerce_' . $this->order_type . '_list_table_should_render_blank_state', null, $this );