add custom columns to order list view
This commit is contained in:
@@ -370,6 +370,25 @@ class Wiaas_Order {
|
||||
return $response;
|
||||
}
|
||||
|
||||
public static function get_order_customer_full_name($order_id){
|
||||
$order = wc_get_order($order_id);
|
||||
|
||||
$customer_user_id = $order->get_customer_id();
|
||||
|
||||
$customer = get_userdata($customer_user_id);
|
||||
|
||||
return $customer->last_name . ' ' . $customer->first_name;
|
||||
}
|
||||
|
||||
public static function get_order_commercial_lead_name($order_id){
|
||||
$order = wc_get_order($order_id);
|
||||
|
||||
$commercial_lead_org_id = $order->get_meta('_wiaas_commercial_lead_id', true);
|
||||
$commercial_lead_organization_info = wiaas_get_organization_info($commercial_lead_org_id);
|
||||
|
||||
return $commercial_lead_organization_info['name'];
|
||||
}
|
||||
|
||||
public static function set_order_vat($order_id, $vat_code) {
|
||||
add_post_meta($order_id, '_wiaas_vat_code', $vat_code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user