WC_Product_Variation::adjust_cogs_value_before_set()
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 Product Variation::adjust cogs value before set WC 9.8.2
protected function adjust_cogs_value_before_set( ?float $value ): ?float { return $value; }