public static function get_customer_details()
{
check_ajax_referer('get-customer-details', 'security');
if (!current_user_can('edit_shop_orders')) {
die(-1);
}
$user_id = absint($_POST['user_id']);
$customer = new WC_Customer($user_id);
$customer_data = apply_filters('woocommerce_found_customer_details', $customer->get_data(), $user_id);
wp_send_json($customer_data);
}