Some items in your cart have reached their purchase limit.
checkout.product.out_of_stock
This product is out of stock.
checkout.price.exceeds_purchase_limit
You have exceeded the purchase limit for this product.
checkout.shipping_address.postal_code.invalid
Your postal code is not valid.
To find error codes for specific scenarios, open your browser’s Developer Tools (F12), go to the Network tab, and trigger the error on your checkout. Look at the XHR/Fetch request response—the code field in the JSON response is what you’ll use in your filter.
add_filter( 'surecart/translated_error', function( $translated, $response ) { $code = $response['code'] ?? ''; $shipping_messages = [ 'checkout.shipping_address.postal_code.invalid' => 'Please enter a valid ZIP/postal code for your country.', 'checkout.shipping_address.inaccurate' => 'We need a bit more detail—please add your street address or apartment number.', 'checkout.selected_shipping_choice.blank' => 'Sorry, we can\'t ship to your location yet. Contact us for alternatives.', ]; return $shipping_messages[ $code ] ?? $translated;}, 10, 2 );