WC_Cart_Totals::get_totals()
Get all totals with or without precision (in cents).
Метод класса: WC_Cart_Totals{}
Хуков нет.
Возвращает
Массив.
.
Использование
$WC_Cart_Totals = new WC_Cart_Totals(); $WC_Cart_Totals->get_totals( $in_cents );
- $in_cents(true|false)
- Should the totals be returned in cents, or without precision.
По умолчанию: false
Список изменений
С версии 3.2.0 | Введена. |
Код WC_Cart_Totals::get_totals() WC Cart Totals::get totals WC 8.7.0
public function get_totals( $in_cents = false ) { return $in_cents ? $this->totals : wc_remove_number_precision_deep( $this->totals ); }