WC_Abstract_Order::set_cogs_total_value
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.
Method of the class: WC_Abstract_Order{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Abstract_Order = new WC_Abstract_Order(); $WC_Abstract_Order->set_cogs_total_value( $value );
- $value(float) (required)
- The value to set for this order.
WC_Abstract_Order::set_cogs_total_value() WC Abstract Order::set cogs total value code WC 10.3.6
public function set_cogs_total_value( float $value ) {
if ( $this->has_cogs() && $this->cogs_is_enabled( __METHOD__ ) ) {
$this->set_prop( 'cogs_total_value', $value );
}
}