show item prices in order preview

This commit is contained in:
Bilal Catic
2018-11-27 00:01:09 +01:00
parent 434d0ab6b3
commit 8b5ea356e7

View File

@@ -505,7 +505,14 @@ class WC_Admin_List_Table_Orders extends Wiaas_Custom_WC_Admin_List_Table {
$html .= wc_price( $item->get_total_tax(), array( 'currency' => $order->get_currency() ) );
break;
case 'total':
$html .= wc_price( $item->get_total(), array( 'currency' => $order->get_currency() ) );
$item_price = $item->get_meta('_wiaas_product_price');
if ($item_price){
$total_price = $item->get_quantity() * floatval($item_price);
}else{
$total_price = $item->get_total();
}
$html .= wc_price( $total_price , array( 'currency' => $order->get_currency() ) );
break;
default:
$html .= apply_filters( 'woocommerce_admin_order_preview_line_item_column_' . sanitize_key( $column ), '', $item, $item_id, $order );