Merge pull request #29008 from inc2734/patch-1

The order of the full name returned by WC_Countries::get_formatted_address()
This commit is contained in:
Roy Ho 2021-03-04 07:31:45 -08:00 committed by GitHub
commit 20c8cbee0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 2 deletions

View File

@ -602,7 +602,12 @@ class WC_Countries {
array(
'{first_name}' => $args['first_name'],
'{last_name}' => $args['last_name'],
'{name}' => $args['first_name'] . ' ' . $args['last_name'],
'{name}' => sprintf(
/* translators: 1: first name 2: last name */
_x( '%1$s %2$s', 'full name', 'woocommerce' ),
$args['first_name'],
$args['last_name']
),
'{company}' => $args['company'],
'{address_1}' => $args['address_1'],
'{address_2}' => $args['address_2'],
@ -612,7 +617,14 @@ class WC_Countries {
'{country}' => $full_country,
'{first_name_upper}' => wc_strtoupper( $args['first_name'] ),
'{last_name_upper}' => wc_strtoupper( $args['last_name'] ),
'{name_upper}' => wc_strtoupper( $args['first_name'] . ' ' . $args['last_name'] ),
'{name_upper}' => wc_strtoupper(
sprintf(
/* translators: 1: first name 2: last name */
_x( '%1$s %2$s', 'full name', 'woocommerce' ),
$args['first_name'],
$args['last_name']
)
),
'{company_upper}' => wc_strtoupper( $args['company'] ),
'{address_1_upper}' => wc_strtoupper( $args['address_1'] ),
'{address_2_upper}' => wc_strtoupper( $args['address_2'] ),