before proceeding with above steps make sure to add following line of code to your functions.php
add_filter('woocommerce_stripe_woocommerce_addon_error','woocommerce_stripe_woocommerce_addon_error_overide',$error) ;
function woocommerce_stripe_woocommerce_addon_error_overide($body){
if($body['error']['type'] == 'invalid_request_error' ){
$error = 'Please make sure you have entered the correct credit card details.';
}
if($body['error']['type'] == 'incorrect_number' ){
$error = 'The card number is incorrect.';
}
if($body['error']['type'] == 'invalid_number' ){
$error = 'The card number is not a valid credit card number.';
}
if($body['error']['type'] == 'invalid_expiry_month' ){
$error = 'The card\'s expiration month is invalid.';
}
if($body['error']['type'] == 'invalid_expiry_year' ){
$error = 'The card\'s expiration year is invalid.';
}
if($body['error']['type'] == 'invalid_cvc' ){
$error = 'The card\'s security code is invalid.';
}
if($body['error']['type'] == 'expired_card' ){
$error = 'The card has expired.';
}
if($body['error']['type'] == 'incorrect_cvc' ){
$error = 'The card\'s security code is incorrect.';
}
if($body['error']['type'] == 'incorrect_zip' ){
$error = 'The card\'s zip code failed validation.';
}
if($body['error']['type'] == 'card_declined' ){
$error = 'The card was declined.';
}
if($body['error']['type'] == 'missing' ){
$error = 'There is no card on a customer that is being charged.';
}
if($body['error']['type'] == 'processing_error' ){
$error = 'An error occurred while processing the card.';
}
if($body['error']['type'] == 'rate_limit' ){
$error = 'An error occurred due to requests hitting the API too quickly. Please let us know if you\'re consistently running into this error.';
}
return $error ;
}
Thanks