From 5eb3888045fd8160ecc3e1ceb9c9cea4128dc4ac Mon Sep 17 00:00:00 2001 From: "Dev49.net" Date: Mon, 11 Apr 2016 04:13:46 +0200 Subject: [PATCH] Added fallback to company name if names are not specified Use case described in Issue #10666 --- includes/admin/class-wc-admin-post-types.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 55cb289d388..2d1f840dd34 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -750,6 +750,8 @@ class WC_Admin_Post_Types { } else { if ( $the_order->billing_first_name || $the_order->billing_last_name ) { $username = trim( sprintf( _x( '%1$s %2$s', 'full name', 'woocommerce' ), $the_order->billing_first_name, $the_order->billing_last_name ) ); + } else if ( $the_order->billing_company ) { + $username = trim( $the_order->billing_company ); } else { $username = __( 'Guest', 'woocommerce' ); }