WC_Product::get_cogs_value()
Get the defined value of the Cost of Goods Sold for this product.
WARNING! If the Cost of Goods Sold feature is disabled this method will always return zero.
Method of the class: WC_Product{}
No Hooks.
Return
float
. The current value for this product.
Usage
$WC_Product = new WC_Product(); $WC_Product->get_cogs_value(): float;
WC_Product::get_cogs_value() WC Product::get cogs value code WC 9.5.1
public function get_cogs_value(): float { return $this->cogs_is_enabled( __METHOD__ ) ? (float) $this->get_prop( 'cogs_value' ) : 0; }