Alchimix
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Themes and Templates
In reply to: Divi theme-issue with blurb iconsFound the problem !!
Just change your character set in your table wp-post to utf-8, you should be in latin.Hope it helps !
Forum: Themes and Templates
In reply to: Divi theme-issue with blurb iconsExactly same problem here …
Forum: Plugins
In reply to: [Striper - Stripe Integration for WooCommerce] Translating error messagesHey there,
I’ve found a solution : modify templates/payment.php.
Find the line with the condition ‘if (response.error)’ then add some custom error messages :var errorMessages = { incorrect_number: "<?php _e( 'The card number is incorrect.', 'striper' ); ?>", invalid_number: "<?php _e( 'The card number is not a valid credit card number.', 'striper' ); ?>", invalid_expiry_month: "<?php _e( "The card's expiration month is invalid.", "striper" ); ?>", invalid_expiry_year: "<?php _e( "The card's expiration year is invalid.", "striper" ); ?>", invalid_cvc: "<?php _e( "The card's security code is invalid.", "striper" ); ?>", expired_card: "<?php _e( "The card has expired.", "striper" ); ?>", incorrect_cvc: "<?php _e( "The card's security code is incorrect.", "striper" ); ?>", incorrect_zip: "The card's zip code failed validation.", card_declined: "<?php _e( "The card was declined.", "striper" ); ?>", missing: "There is no card on a customer that is being charged.", processing_error: "<?php _e( "An error occurred while processing the card", "striper" ); ?>.", rate_limit: "An error occurred due to requests hitting the API too quickly. Please let us know if you're consistently running into this error." };You will notice I use the _e() function to register variables in WPML so they are translatable after this with string translations.
Then replace this line :
$form.find('.payment-errors').text(response.error.message);With:
$form.find('.payment-errors').text(errorMessages[response.error.code] );That’s all 🙂
Cheers !
Viewing 3 replies - 1 through 3 (of 3 total)