function template_preprocess_uc_payment_totals in Ubercart 8.4
Prepares variables for the payment totals template.
Default template: uc-payment-totals.html.twig.
File
- payment/
uc_payment/ uc_payment.module, line 42 - Defines the payment API that lets payment modules interact with Ubercart.
Code
function template_preprocess_uc_payment_totals(&$variables) {
$variables['line_items'] = $variables['order']
->getDisplayLineItems();
foreach ($variables['line_items'] as $key => $line) {
$variables['line_items'][$key]['title'] = Xss::filter($line['title']);
$variables['line_items'][$key]['amount'] = uc_currency_format($line['amount']);
}
}