WC_Product_Variation::set_cogs_value_is_additivepublicWC 1.0

Set the value of the "Cost of Goods Sold value is additive" flag for this product. See get_cogs_effective_value_core.

WARNING! If the Cost of Goods Sold feature is disabled this value will NOT be persisted when the product is saved.

Method of the class: WC_Product_Variation{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WC_Product_Variation = new WC_Product_Variation();
$WC_Product_Variation->set_cogs_value_is_additive( $value ): void;
$value(true|false) (required)
The value to set for the flag.

WC_Product_Variation::set_cogs_value_is_additive() code WC 10.3.6

public function set_cogs_value_is_additive( bool $value ): void {
	$this->set_prop( 'cogs_value_is_additive', $value );
}