Title: Code Submit Request (FIX for Stripe Gateway)
Last modified: December 16, 2019

---

# Code Submit Request (FIX for Stripe Gateway)

 *  Resolved [Paul](https://wordpress.org/support/users/paulschiretz/)
 * (@paulschiretz)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/code-submit-request-fix-for-stripe/)
 * Hi there i solved my issue with Stripe Gateway for Woocommerce.
 * [https://wordpress.org/support/topic/conflict-with-stripe-gateway-for-woocommerce/](https://wordpress.org/support/topic/conflict-with-stripe-gateway-for-woocommerce/)
 * In Version 1.6.3 in class-translation-manager.php on line 941 an error is thrown(
   stripe gateway passes an array to this function somehow):
 * Basically i needed to check if $string is really a string in strip_gettext_tags
   of class-translation-manager.php . I only added a simple `is_string($string) &&`
   to the if clause to avoid a php error if for instance an array is passed into
   this function.
 *     ```
       	/**
       	 * function that strips the gettext tags from a string
       	 * @param $string
       	 * @return mixed
       	 */
       	static function strip_gettext_tags( $string ){
       		if( is_string($string) && strpos( $string, ' data-trpgettextoriginal=' ) !== false ) {
       			$string = preg_replace('/ data-trpgettextoriginal=\d+#!trpen#/', '', $string);
       			$string = str_replace('#!trpst#trp-gettext', '', $string);
       			$string = str_replace('#!trpst#/trp-gettext', '', $string);
       			$string = str_replace('#!trpst#\/trp-gettext', '', $string);
       			$string = str_replace('#!trpen#', '', $string);
       		}
   
       		return $string;
       	}
       ```
   
 * It’s a very simple fix and i think it might also solve a 3 months old issue of
   your plugin:
 * [https://wordpress.org/support/topic/error-messages-issue/](https://wordpress.org/support/topic/error-messages-issue/)
 * Hope I could have been of some help.
    Please let me know if you added it to your
   next update so I’m future save again.
 * Thanks
    Paul
 * PS: I’m a c++ dev Types are my friends 😉
    -  This topic was modified 6 years, 5 months ago by [Paul](https://wordpress.org/support/users/paulschiretz/).
    -  This topic was modified 6 years, 5 months ago by [Paul](https://wordpress.org/support/users/paulschiretz/).

Viewing 1 replies (of 1 total)

 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/code-submit-request-fix-for-stripe/#post-12247226)
 * Hello Paul,
 * Thank your for the fix you have provided.
 * Indeed, it is helpful and we will almost certainly add it in the next version
   of TranslatePress.
 * I will get back to you when it is implemented.
 * With the best wishes,

Viewing 1 replies (of 1 total)

The topic ‘Code Submit Request (FIX for Stripe Gateway)’ is closed to new replies.

 * ![](https://ps.w.org/translatepress-multilingual/assets/icon.svg?rev=3166541)
 * [TranslatePress - Translate Multilingual sites with AI Translation](https://wordpress.org/plugins/translatepress-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/translatepress-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/translatepress-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/translatepress-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/translatepress-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/translatepress-multilingual/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/code-submit-request-fix-for-stripe/#post-12247226)
 * Status: resolved