WC_Product::get_cogs_effective_value_core()protectedWC 1.0

Core method to get the effective value of the Cost of Goods Sold for this product. (the final, actual monetary value).

Derived classes can override this method to provide an alternative way of calculating the effective value from the defined value, see for example the WC_Product_Variation class.

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

Хуков нет.

Возвращает

float. The effective value for this product.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_cogs_effective_value_core(): float;

Код WC_Product::get_cogs_effective_value_core() WC 9.7.1

protected function get_cogs_effective_value_core(): float {
	return $this->get_cogs_value() ?? 0;
}