format_postcode() public static méthode

Format the postcode according to the country and length of the postcode.
public static format_postcode ( $postcode, $country ) : string
Résultat string formatted postcode
Exemple #1
0
 /**
  * Data provider for test_format_postcode.
  *
  * @since 2.4
  */
 public function data_provider_test_format_postcode()
 {
     return array(array('99999', WC_Validation::format_postcode('99999', 'IT')), array('99999', WC_Validation::format_postcode(' 99999 ', 'IT')), array('99999', WC_Validation::format_postcode('999 99', 'IT')), array('ABCDE', WC_Validation::format_postcode('abcde', 'IT')), array('AB CDE', WC_Validation::format_postcode('abcde', 'GB')), array('AB CDE', WC_Validation::format_postcode('abcde', 'CA')));
 }