WC_Product::set_low_stock_amount()publicWC 3.5.0

Set low stock amount.

Method of the class: WC_Product{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product = new WC_Product();
$WC_Product->set_low_stock_amount( $amount );
$amount(int|string) (required)
Empty string if value not set.

Changelog

Since 3.5.0 Introduced.

WC_Product::set_low_stock_amount() code WC 8.7.0

public function set_low_stock_amount( $amount ) {
	$this->set_prop( 'low_stock_amount', '' === $amount ? '' : absint( $amount ) );
}