wc_format_stock_quantity_for_display( int $stock_quantity, WC_Product $product )

Format the stock quantity ready for display.


Description Description


Parameters Parameters

$stock_quantity

(Required) Stock quantity.

$product

(Required) Product instance so that we can pass through the filters.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/wc-formatting-functions.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.