WPML
Status
Open
Reported for
WPML Multilingual & Multicurrency for WooCommerce 5.1.2
Related plugin/theme
PayZen for WooCommerce
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;
} );

All known issues →