WC_Product_Variation::adjust_cogs_value_before_setprotectedWC 1.0

Replacement of the parent adjust_cogs_value_before_set method to disable the conversion of zero to null.

Method of the class: WC_Product_Variation{}

No Hooks.

Returns

float|null. The actual value that will be set for the cost property.

Usage

// protected - for code of main (parent) or child class
$result = $this->adjust_cogs_value_before_set( ?float $value ): ?float;
?float $value(required)
.

WC_Product_Variation::adjust_cogs_value_before_set() code WC 10.3.6

protected function adjust_cogs_value_before_set( ?float $value ): ?float {
	return $value;
}