
<?php echo WC()->cart->get_cart_subtotal(); ?> Сумма выводится этой функцией.
Как ее можно изменить чтоб валюта появлялась в конце, а не в начале.
Сейчас вот так
А нужно так
Код функции:
publicfunctionget_cart_subtotal($compound=false){
// If the cart has compound tax, we want to show the subtotal as
// cart + shipping + non-compound taxes (after discount)
if($compound){
$cart_subtotal=wc_price($this->cart_contents_total+$this->shipping_total+$this->get_taxes_total(false,false));
// Otherwise we show cart items totals only (before discount)
}else{
// Display varies depending on settings
if($this->tax_display_cart=='excl'){
$cart_subtotal=wc_price($this->subtotal_ex_tax);
if($this->tax_total>0&&$this->prices_include_tax){
$cart_subtotal.=' <small class="tax_label">'.WC()->countries->ex_tax_or_vat().'</small>';
}
}else{
$cart_subtotal=wc_price($this->subtotal);
if($this->tax_total>0&&!$this->prices_include_tax){
$cart_subtotal.=' <small class="tax_label">'.WC()->countries->inc_tax_or_vat().'</small>';
}
}
}
returnapply_filters('woocommerce_cart_subtotal',$cart_subtotal,$compound,$this);
}
Заранее извините за глупые вопросы.
Как ее можно изменить чтоб валюта появлялась в конце, а не в начале.
Сейчас вот так

А нужно так

Код функции:
publicfunctionget_cart_subtotal($compound=false){
// If the cart has compound tax, we want to show the subtotal as
// cart + shipping + non-compound taxes (after discount)
if($compound){
$cart_subtotal=wc_price($this->cart_contents_total+$this->shipping_total+$this->get_taxes_total(false,false));
// Otherwise we show cart items totals only (before discount)
}else{
// Display varies depending on settings
if($this->tax_display_cart=='excl'){
$cart_subtotal=wc_price($this->subtotal_ex_tax);
if($this->tax_total>0&&$this->prices_include_tax){
$cart_subtotal.=' <small class="tax_label">'.WC()->countries->ex_tax_or_vat().'</small>';
}
}else{
$cart_subtotal=wc_price($this->subtotal);
if($this->tax_total>0&&!$this->prices_include_tax){
$cart_subtotal.=' <small class="tax_label">'.WC()->countries->inc_tax_or_vat().'</small>';
}
}
}
returnapply_filters('woocommerce_cart_subtotal',$cart_subtotal,$compound,$this);
}
Заранее извините за глупые вопросы.