WordPress at Your Fingertips
function is not described

WC_Product::set_sold_individually() public WC 3.0.0

Set if should be sold individually.

{} It's a method of the class: WC_Product{}

No Hooks.

Return

null. Nothing.

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.

Code of WC_Product::set_sold_individually() WC 5.5.2

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