WC_Abstract_Order::set_cogs_total_value │ public │ WC 1.0

Set the value of the Cost of Goods Sold for this order.

WARNING! If the Cost of Goods Sold feature is disabled this method will have no effect.

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

Хуков нет.

Возвращает

void. Ничего (null).

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

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->set_cogs_total_value( $value );
$value(float) (обязательный)
The value to set for this order.

Код WC_Abstract_Order::set_cogs_total_value() WC 11.3.0

public function set_cogs_total_value( float $value ) {
	if ( $this->has_cogs() && $this->cogs_is_enabled( __METHOD__ ) ) {
		$this->set_prop( 'cogs_total_value', $value );
	}
}