Skip to content Skip to sidebar

Resolved

Resolved in: WPML Multilingual & Multicurrency for WooCommerce 5.5.3

Topic Tags: WCML

Overview of the issue

When sending Products for translation, they may in some circumstances become stuck.

A key symptom of this particular case is a PHP Warning in the debug.log:

>PHP Warning Undefined array key “values” in /var/www/sites/red-harmonica/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-tp-support.php on line 158

The issue happens when the product has attributes with values that are wholly made of special characters, e.g. “+ & -“, which has no letters.

Workaround

This will be fixed in WCML 5.5.3, but in the meantime you can directly edit the plugin file wp-content/plugins/woocommerce-multilingual/inc/class-wcml-tp-support.php.

Locate this line (line 158 in the current version):

$product_attributes[ $attribute_key ]['value'] = join( ' | ', $attribute['values'] );

and replace it with

$product_attributes[ $attribute_key ]['value'] = isset( $attribute['values'] ) ? join( ' | ', $attribute['values'] ) : $product_attributes[ $attribute_key ]['value'];