Code Submit Request (FIX for Stripe Gateway)
-
Hi there i solved my issue with Stripe Gateway for Woocommerce.
https://www.ads-software.com/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://www.ads-software.com/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
PaulPS: I’m a c++ dev Types are my friends ??
- The topic ‘Code Submit Request (FIX for Stripe Gateway)’ is closed to new replies.