WordPress at Your Fingertips
function is not described

WC_Validation::format_postcode() public WC 1.0

Format the postcode according to the country and length of the postcode.

{} It's a method of the class: WC_Validation{}

No Hooks.

Return

String. Formatted postcode.

Usage

$result = WC_Validation::format_postcode( $postcode, $country );
$postcode(string) (required)
Postcode to format.
$country(string) (required)
Country to format the postcode for.

Code of WC_Validation::format_postcode() WC 5.6.0

public static function format_postcode( $postcode, $country ) {
	return wc_format_postcode( $postcode, $country );
}