WC_Product::get_cogs_effective_value()publicWC 1.0

Get the effective value of the Cost of Goods Sold for this product.

The effective value is the defined value once converted to a monetary value; in the current implementation both values are always equal, but this could change in the future (or in derived classes). See also get_cogs_effective_value_core and get_cogs_total_value.

WARNING! If the Cost of Goods Sold feature is disabled this method will always return zero.

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

Хуков нет.

Возвращает

float. The effective value for this product.

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

$WC_Product = new WC_Product();
$WC_Product->get_cogs_effective_value(): float;

Код WC_Product::get_cogs_effective_value() WC 9.7.1

public function get_cogs_effective_value(): float {
	return $this->cogs_is_enabled( __METHOD__ ) ? $this->get_cogs_effective_value_core() : 0;
}