WC_Product_Variation::get_cogs_value_overrides_parent()publicWC 1.0

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

If the flag is set to true, the effective value is equal to the defined value for this variation. Otherwise, the effective value is equal to the sum of the defined values for the variation and the parent product.

Method of the class: WC_Product_Variation{}

No Hooks.

Return

true|false. The current value of the flag.

Usage

$WC_Product_Variation = new WC_Product_Variation();
$WC_Product_Variation->get_cogs_value_overrides_parent(): bool;

WC_Product_Variation::get_cogs_value_overrides_parent() code WC 9.5.1

public function get_cogs_value_overrides_parent(): bool {
	return (bool) $this->get_prop( 'cogs_value_overrides_parent' );
}