Skip Navigation

Open

Reported for: WooCommerce Multilingual & Multicurrency 5.1.2

Topic Tags: Compatibility

Overview of the issue

When using the PayZen for WooCommerce plugin, WooCommerce orders are not visible in the Dashboard and the following PHP error appears:

PHP Fatal error: Uncaught TypeError: md5(): Argument #1 ($string) must be of type string, array given in …wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php:210

Workaround

Please, make sure of having a full backup of your site before proceeding.

Open your theme’s functions.php file and add this code:

add_filter( 'option_woocommerce_payzenstd_settings', function( $settings ) {
	$locale = get_locale();
	foreach ( [ 'title', 'description' ] as $key ) {
		if ( is_array( $settings[ $key ] ) ) {
			$settings[ $key ] = isset( $settings[ $key ][ $locale ] )
				? $settings[ $key ][ $locale ]
				: $settings[ $key ]['en_US'];
		}
	}

	return $settings;
} );

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>