WC_Abstract_Order::get_cogs_total_value()
Get the value of the Cost of Goods Sold for this order.
WARNING! If the Cost of Goods Sold feature is disabled this method will always return zero.
Method of the class: WC_Abstract_Order{}
No Hooks.
Return
float
. The current value for this order.
Usage
$WC_Abstract_Order = new WC_Abstract_Order(); $WC_Abstract_Order->get_cogs_total_value(): float;
WC_Abstract_Order::get_cogs_total_value() WC Abstract Order::get cogs total value code WC 9.5.1
public function get_cogs_total_value(): float { return (float) ( $this->has_cogs() && $this->cogs_is_enabled( __METHOD__ ) ? $this->get_prop( 'cogs_total_value' ) : 0 ); }