WC_Abstract_Order::get_cogs_total_value │ public │ WC 1.0

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.

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

Хуков нет.

Возвращает

float. The current value for this order.

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

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->get_cogs_total_value(): float;

Код WC_Abstract_Order::get_cogs_total_value() WC 11.3.0

public function get_cogs_total_value(): float {
	return (float) ( $this->has_cogs() && $this->cogs_is_enabled( __METHOD__ ) ? $this->get_prop( 'cogs_total_value' ) : 0 );
}