WC_Product_Variation::set_cogs_value_overrides_parent()publicWC 1.0

Set the value of the "Cost of Goods Sold value overrides parent value" flag for this product.

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.

Return

null. Nothing (null).

Usage

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

WC_Product_Variation::set_cogs_value_overrides_parent() code WC 9.5.1

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