WordPress at Your Fingertips
function is not described

WC_Abstract_Order::set_total() public WC 1.0

Set total.

{} It's a method of the class: WC_Abstract_Order{}

No Hooks.

Return

true|false|null.

Usage

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->set_total( $value, $deprecated );
$value(string) (required)
Value to set.
$deprecated(string)
Function used to set different totals based on this.
Default: ''

Code of WC_Abstract_Order::set_total() WC 5.8.0

public function set_total( $value, $deprecated = '' ) {
	if ( $deprecated ) {
		wc_deprecated_argument( 'total_type', '3.0', 'Use dedicated total setter methods instead.' );
		return $this->legacy_set_total( $value, $deprecated );
	}
	$this->set_prop( 'total', wc_format_decimal( $value, wc_get_price_decimals() ) );
}