Merge pull request #10667 from Dev49net/master

Add fallback to company name if customer names are not specified
This commit is contained in:
Mike Jolley 2016-04-15 10:07:29 -05:00
commit c2820f608a
1 changed files with 2 additions and 0 deletions

View File

@ -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' );
}