woocommerce_status_widget_low_in_stock_count_pre_query хук-фильтрWC 4.3.0

Status widget low in stock count pre query.

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

add_filter( 'woocommerce_status_widget_low_in_stock_count_pre_query', 'wp_kama_woocommerce_status_widget_low_in_stock_count_pre_query_filter', 10, 3 );

/**
 * Function for `woocommerce_status_widget_low_in_stock_count_pre_query` filter-hook.
 * 
 * @param null|string $low_in_stock_count Low in stock count, by default null.
 * @param int         $stock              Low stock amount.
 * @param int         $nostock            No stock amount
 *
 * @return null|string
 */
function wp_kama_woocommerce_status_widget_low_in_stock_count_pre_query_filter( $low_in_stock_count, $stock, $nostock ){

	// filter...
	return $low_in_stock_count;
}
$low_in_stock_count(null|строка)
Low in stock count, by default null.
$stock(int)
Low stock amount.
$nostock(int)
No stock amount

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

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

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

WC_Admin_Dashboard::status_widget_stock_rows()
woocommerce_status_widget_low_in_stock_count_pre_query
woocommerce/includes/admin/class-wc-admin-dashboard.php 261
$lowinstock_count = apply_filters( 'woocommerce_status_widget_low_in_stock_count_pre_query', null, $stock, $nostock );

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

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