Fix phpcs violations automatically using phpcbf
This commit is contained in:
parent
76b7f5b381
commit
05bae41b24
|
@ -473,7 +473,8 @@ class WC_Countries {
|
||||||
public function get_address_formats() {
|
public function get_address_formats() {
|
||||||
if ( empty( $this->address_formats ) ) {
|
if ( empty( $this->address_formats ) ) {
|
||||||
$this->address_formats = apply_filters(
|
$this->address_formats = apply_filters(
|
||||||
'woocommerce_localisation_address_formats', array(
|
'woocommerce_localisation_address_formats',
|
||||||
|
array(
|
||||||
'default' => "{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country}",
|
'default' => "{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country}",
|
||||||
'AU' => "{name}\n{company}\n{address_1}\n{address_2}\n{city} {state} {postcode}\n{country}",
|
'AU' => "{name}\n{company}\n{address_1}\n{address_2}\n{city} {state} {postcode}\n{country}",
|
||||||
'AT' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}",
|
'AT' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}",
|
||||||
|
@ -557,8 +558,10 @@ class WC_Countries {
|
||||||
|
|
||||||
// Substitute address parts into the string.
|
// Substitute address parts into the string.
|
||||||
$replace = array_map(
|
$replace = array_map(
|
||||||
'esc_html', apply_filters(
|
'esc_html',
|
||||||
'woocommerce_formatted_address_replacements', array(
|
apply_filters(
|
||||||
|
'woocommerce_formatted_address_replacements',
|
||||||
|
array(
|
||||||
'{first_name}' => $args['first_name'],
|
'{first_name}' => $args['first_name'],
|
||||||
'{last_name}' => $args['last_name'],
|
'{last_name}' => $args['last_name'],
|
||||||
'{name}' => $args['first_name'] . ' ' . $args['last_name'],
|
'{name}' => $args['first_name'] . ' ' . $args['last_name'],
|
||||||
|
@ -580,7 +583,8 @@ class WC_Countries {
|
||||||
'{state_code}' => strtoupper( $state ),
|
'{state_code}' => strtoupper( $state ),
|
||||||
'{postcode_upper}' => strtoupper( $args['postcode'] ),
|
'{postcode_upper}' => strtoupper( $args['postcode'] ),
|
||||||
'{country_upper}' => strtoupper( $full_country ),
|
'{country_upper}' => strtoupper( $full_country ),
|
||||||
), $args
|
),
|
||||||
|
$args
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -737,7 +741,8 @@ class WC_Countries {
|
||||||
public function get_country_locale() {
|
public function get_country_locale() {
|
||||||
if ( empty( $this->locale ) ) {
|
if ( empty( $this->locale ) ) {
|
||||||
$this->locale = apply_filters(
|
$this->locale = apply_filters(
|
||||||
'woocommerce_get_country_locale', array(
|
'woocommerce_get_country_locale',
|
||||||
|
array(
|
||||||
'AE' => array(
|
'AE' => array(
|
||||||
'postcode' => array(
|
'postcode' => array(
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
|
Loading…
Reference in New Issue