woocommerce_(order_type)_list_table_should_render_blank_state хук-фильтрWC 8.6.0

Whether we should render a blank state so that custom count queries can be used.

Использование

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(объект)
ListTable The current instance of the class.

Список изменений

С версии 8.6.0 Введена.

Где вызывается хук

ListTable::should_render_blank_state()
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
);

Где используется хук в WooCommerce

Использование не найдено.