Custom line items to be included in $order->getTotal() I am using Ubercart for our e-commerce on Drupal 8 website. Everything seems to be working fine except for the $order-&gt;getTotal() function - it does not somehow pickup the amount from my custom line items (for eg. 'shipping and handling') that I have added to the order.

It only seems to be going over the default 3 line items (subtotal, total, generic) that are provided by the uc_order module.

How can I achieve that? Thank you in advance.
I was able to achieve this by adding type as 'generic' for all my custom line items.
Sample code: 

uc_order_line_item_add($order->id(), 'generic', 'Promotion', -100, 6, NULL);