Added fallback to company name if names are not specified
Use case described in Issue #10666
This commit is contained in:
parent
00c3bf9ce3
commit
5eb3888045
|
@ -750,6 +750,8 @@ class WC_Admin_Post_Types {
|
||||||
} else {
|
} else {
|
||||||
if ( $the_order->billing_first_name || $the_order->billing_last_name ) {
|
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 ) );
|
$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 {
|
} else {
|
||||||
$username = __( 'Guest', 'woocommerce' );
|
$username = __( 'Guest', 'woocommerce' );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue