WC_Product::set_sold_individually()publicWC 3.0.0

Set if should be sold individually.

Method of the class: WC_Product{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product = new WC_Product();
$WC_Product->set_sold_individually( $sold_individually );
$sold_individually(true|false) (required)
Whether or not product is sold individually.

Changelog

Since 3.0.0 Introduced.

WC_Product::set_sold_individually() code WC 8.7.0

public function set_sold_individually( $sold_individually ) {
	$this->set_prop( 'sold_individually', wc_string_to_bool( $sold_individually ) );
}