Introduces woocommerce_format_postcode filter
This commit is contained in:
parent
133c904d1a
commit
9a4dae158f
|
@ -634,7 +634,7 @@ function wc_format_postcode( $postcode, $country ) {
|
|||
$postcode = trim( substr_replace( $postcode, ' ', -3, 0 ) );
|
||||
}
|
||||
|
||||
return $postcode;
|
||||
return apply_filters( 'woocommerce_format_postcode', $postcode, $country );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -644,8 +644,7 @@ function wc_format_postcode( $postcode, $country ) {
|
|||
* @return string
|
||||
*/
|
||||
function wc_format_phone_number( $tel ) {
|
||||
$tel = str_replace( '.', '-', $tel );
|
||||
return $tel;
|
||||
return str_replace( '.', '-', $tel );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue