Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 3 voices.

Last updated by roxanneS 4 years, 9 months ago.

Assigned support staff: George Botsev.

Author Posts
October 11, 2016 at 1:58 pm #1112927


I am trying to: Site crashed after WooCommerce Multilingual Update to 3.9.1.

URL of (my) website where problem appears:
hidden link
hidden link

I expected to see: An actual website

Instead, I got:
Fatal error: Can't use function return value in write context in /home/gourmet/public_html/wp/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-cart.php on line 209
Steps to duplicate the issue:
Update to latest version of WooCommerce Multilingual

October 11, 2016 at 5:26 pm #1113140


Having the exact same issue after updating from 3.8.6 to 3.9.1. After the successful update both frond-end and back-end crashed with the same fatal error as above.

October 12, 2016 at 7:03 am #1113427

George Botsev

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

Hello, we just released a patch for the issue that you are mentioning here.
It seems that the issue happens if you have PHP version less than 5.6.
Please do mind that we recommend and require at least PHP 5.6 for our plugin WooCommerce Multilingual as listed in

In order to fix the problem now, you can just get a fresh version of the plugin from, or go to the file:
/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-cart.php to line 209:

		 if( !empty( preg_match( '/\.'.$attachment.'$/',  $_SERVER['REQUEST_URI'] ) ) ){

and replace that line with this code:

		 $match = preg_match( '/\.'.$attachment.'$/',  $_SERVER['REQUEST_URI'] );
                 if( !empty( $match ) ){

Either of this actions should fix the problem.

October 16, 2016 at 9:34 am #1116200


Thank you so much.