From b1b6ff8ff2a19199d40d2ad53863f1f05549ed6e Mon Sep 17 00:00:00 2001 From: Geert De Deckere Date: Mon, 13 Feb 2012 13:13:47 +0100 Subject: [PATCH] Added filter: woocommerce_formatted_address_replacements --- classes/class-wc-countries.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/class-wc-countries.php b/classes/class-wc-countries.php index df5a8231c9d..27707ecd91f 100644 --- a/classes/class-wc-countries.php +++ b/classes/class-wc-countries.php @@ -602,7 +602,7 @@ class WC_Countries { $full_state = ($country && $state && isset($this->states[$country][$state])) ? $this->states[$country][$state] : $state; // Substitute address parts into the string - $replace = array( + $replace = apply_filters('woocommerce_formatted_address_replacements', array( '{first_name}' => $first_name, '{last_name}' => $last_name, '{name}' => $first_name . ' ' . $last_name, @@ -623,7 +623,7 @@ class WC_Countries { '{state_upper}' => strtoupper($full_state), '{postcode_upper}' => strtoupper($postcode), '{country_upper}' => strtoupper($full_country), - ); + )); $formatted_address = str_replace( array_keys($replace), $replace, $format );