diff --git a/includes/class-wc-amazon-payments-advanced-api-abstract.php b/includes/class-wc-amazon-payments-advanced-api-abstract.php index 58a85267..a7aba926 100644 --- a/includes/class-wc-amazon-payments-advanced-api-abstract.php +++ b/includes/class-wc-amazon-payments-advanced-api-abstract.php @@ -475,7 +475,7 @@ public static function format_address( $address ) { } - $formatted['phone'] = isset( $address->Phone ) ? (string) $address->Phone : null; + $formatted['phone'] = isset( $address->Phone ) ? (string) preg_replace('/[^0-9-_]/', '', $address->Phone) : null; $formatted['city'] = isset( $address->City ) ? (string) $address->City : null; if ( ! empty( $address->CountryCode ) && in_array( $address->CountryCode, array( 'JP' ) ) ) { if ( empty( $formatted['city'] ) ) {