WC_Abstract_Order::set_total()publicWC 1.0

Set total.

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

Хуков нет.

Возвращает

true|false|null.

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

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->set_total( $value, $deprecated );
$value(строка) (обязательный)
Value to set.
$deprecated(строка)
Function used to set different totals based on this.
По умолчанию: ''

Код WC_Abstract_Order::set_total() WC 8.7.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() ) );
}