wc_format_stock_quantity_for_display()WC 3.0.0

Format the stock quantity ready for display.

Хуки из функции

Возвращает

Строку.

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

wc_format_stock_quantity_for_display( $stock_quantity, $product );
$stock_quantity(int) (обязательный)
Stock quantity.
$product(WC_Product) (обязательный)
Product instance so that we can pass through the filters.

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

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

Код wc_format_stock_quantity_for_display() WC 7.3.0

function wc_format_stock_quantity_for_display( $stock_quantity, $product ) {
	return apply_filters( 'woocommerce_format_stock_quantity', $stock_quantity, $product );
}