No products in the cart.
I am using Stamps.com WooCommerce Extension (USPS) but having a strange error when I click on CREATE SHIPMENT.
Stamps.com: Invalid SOAP message due to XML Schema validation failure. The ‘http://stamps.com/xml/namespace/2015/05/swsim/swsimv45:ZIPCode‘ element is invalid – The value ‘22312-2634’ is invalid according to its datatype ‘http://stamps.com/xml/namespace/2015/05/swsim/swsimv45:string-0-5‘ – The actual length is greater than the MaxLength value.
We check that on the order page your billing address contains the zip code as “22312-2634”, that is causing the soap error, as the data type value exceeds the max value.
We would request you to enter the zip code as 22312 only and ignore the part after “-“. This would solve your solve.
Kindly find the code snippet which will ignore the zip code value after “-“. So, if a customer provides “22312-2634” as the zip code, then the code snippet will automatically ignore “2634” and send only “22312” to API as request. Please find the link to the snippet – https://gist.githubusercontent.com/WooForce/a47f5a5e894547bc94c3b73a66692d69/raw/ac7004120ca81fd6173a7fbd71fb1b4b81c3ce4c/functions.php
Note: Kindly download & install the latest version of the plugin before using the code snippet above.