protected function create_order_fee_lines(&$order)
{
foreach (WC()->cart->get_fees() as $fee_key => $fee) {
$item = new WC_Order_Item_Fee();
$item->set_props(array('name' => $fee->name, 'tax_class' => $fee->taxable ? $fee->tax_class : 0, 'total' => $fee->amount, 'total_tax' => $fee->tax, 'taxes' => array('total' => $fee->tax_data)));
// Set this to pass to legacy actions.
$item->legacy_fee = $fee;
$item->legacy_fee_key = $fee_key;
$order->add_item($item);
}
}