postcode tweak
This commit is contained in:
parent
b5f9d33264
commit
adcd894c60
|
@ -113,13 +113,9 @@ class WC_Validation {
|
|||
$postcode = trim(preg_replace('/[\s]/', '', $postcode));
|
||||
|
||||
if ($country=='GB') :
|
||||
if (strlen($postcode)==7)
|
||||
$postcode = substr_replace($postcode, ' ', 4, 0);
|
||||
elseif (strlen($postcode)==5)
|
||||
$postcode = substr_replace($postcode, ' ', 2, 0);
|
||||
else
|
||||
$postcode = substr_replace($postcode, ' ', 3, 0);
|
||||
$postcode = substr_replace($postcode, ' ', -3, 0);
|
||||
endif;
|
||||
|
||||
return $postcode;
|
||||
}
|
||||
|
||||
|
|
|
@ -143,6 +143,10 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 1.5.2 =
|
||||
* Fixed notice in GA code
|
||||
* Postcode format tweak
|
||||
|
||||
= 1.5.1 - 08/03/2012 =
|
||||
* Persistent (logged-in) customer carts (thanks dominic-p)
|
||||
* Error suppression on set_time_out
|
||||
|
|
Loading…
Reference in New Issue