Title: Stripe errors translation
Last modified: November 3, 2020

---

# Stripe errors translation

 *  Resolved [naza1111](https://wordpress.org/support/users/naza1111/)
 * (@naza1111)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/stripe-errors-translation/)
 * Is it possible to translate errors from stripe like Your card number is invalid

Viewing 1 replies (of 1 total)

 *  Plugin Author [David Parker](https://wordpress.org/support/users/dlparker1005/)
 * (@dlparker1005)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/stripe-errors-translation/#post-13621386)
 * Hello [@naza1111](https://wordpress.org/support/users/naza1111/),
 * It is not possible to translate Stripe errors through traditional WordPress translation
   methods since the error messages themselves are generated in Stripe, though this
   would be possible to implement using custom code.
 * The general steps for this custom code would be to:
    1. Hook into the [pmpro_after_checkout_preheader hook](https://github.com/strangerstudios/paid-memberships-pro/blob/d0b35d76e38ba5c2eac9bdea3100b81ff32ba419/preheaders/checkout.php#L823),
   which is after the error will be generated 2. Check if the message in the `global
   $pmpro_msg` variable is equal to the Stripe error that you would like to translate
   3. Set the `global $pmpro_msg` variable to be the translated text that you would
   like to show
 * If you would like more guidance or hands on help implementing this solution with
   Paid Memberships Pro, please sign up at [http://www.paidmembershipspro.com/pricing](http://www.paidmembershipspro.com/pricing).

Viewing 1 replies (of 1 total)

The topic ‘Stripe errors translation’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [David Parker](https://wordpress.org/support/users/dlparker1005/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/stripe-errors-translation/#post-13621386)
 * Status: resolved