WC_Abstract_Order::set_total( string $value, string $deprecated = '' )

Set total.


Description Description


Parameters Parameters

$value

(string) (Required) Value to set.

$deprecated

(string) (Optional) Function used to set different totals based on this.

Default value: ''


Top ↑

Return Return

(bool|void)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-order.php

	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() ) );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.