Automattic\WooCommerce\Enums

StockDisplayFormat{} │ final │ WC 11.1.0

Enum class for the possible values of the 'woocommerce_stock_format' option.

No Hooks.

Usage

$StockDisplayFormat = new StockDisplayFormat();
// use class methods

Methods

No Methods in class.

Changelog

Since 11.1.0 Introduced.

StockDisplayFormat{} code WC 11.1.2

final class StockDisplayFormat {
	/**
	 * Always show the quantity remaining in stock (e.g. "12 in stock").
	 *
	 * @var string
	 */
	public const ALWAYS_SHOW = '';

	/**
	 * Only show the quantity remaining in stock when it is low (e.g. "Only 2 left in stock").
	 *
	 * @var string
	 */
	public const LOW_AMOUNT = 'low_amount';

	/**
	 * Never show the quantity remaining in stock.
	 *
	 * @var string
	 */
	public const NEVER = 'no_amount';
}