WC_Product_Variation::adjust_cogs_value_before_set()protectedWC 1.0

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

Метод класса: WC_Product_Variation{}

Хуков нет.

Возвращает

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

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->adjust_cogs_value_before_set( ?float $value ): ?float;
?float $value (обязательный)
-

Код WC_Product_Variation::adjust_cogs_value_before_set() WC 9.8.2

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