WC_Product::get_cogs_effective_valuepublicWC 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.

Method of the class: WC_Product{}

No Hooks.

Returns

float. The effective value for this product.

Usage

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

WC_Product::get_cogs_effective_value() code WC 10.4.3

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