Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: I updated my plugins for Woocommerce and WPML and then my site crashed. I get the message: "Fatal error: Can't use function return value in write context in /home/dealicious/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-install.php on line 79". I cannot even access my wp-admin!

Solution: You need to manually update Woocommerce Multilingual plugin. It can be downloaded from here: https://es.wordpress.org/plugins/woocommerce-multilingual/

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 6 replies, has 2 voices.

Last updated by solonH 5 years, 1 month ago.

Assigned support staff: Bernat Torras.

Author Posts
December 14, 2016 at 1:33 pm #1160143

solonH

I am trying to: I updated my plugins for Woocommerce and WPML and then my site crashed. I get the message: "Fatal error: Can't use function return value in write context in /home/dealicious/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-install.php on line 79". I cannot even access my wp-admin!

URL of (my) website where problem appears: dealicious.com.cy

I expected to see:

Instead, I got:

Steps to duplicate the issue:

December 14, 2016 at 1:56 pm #1160185

Bernat Torras

Hi solonH,

Thanks for contacting support and report your problem. I'll be happy to help! 🙂

This really seems related to an error caused by old php versions. Could you please answer us these questions?

1- Which php version are you using? If you're able to update, could you update to any version higher than 5.6 (the minimal php required version) and check if the issue is fixed?

2- Could you tell us from which version of WooCommerce Multilingual are you trying to update? Its important to know your current plugin version.

3- Try to edit "class-wcml-install.php" file and modify this line (should be the content of line number 76):

if ( !empty( WCML_Install::translated_product_type_terms() ) ) {

With this:

$_install = WCML_Install::translated_product_type_terms();  
if ( !empty( $_install ) ) {

Could you tell us if you're able to update then without any error?

Thanks,
Bernat

December 14, 2016 at 2:25 pm #1160225

solonH

Hi Bernat,

1) I am using PHP version 5.4.45 which is the default GoDaddy offers, but I am not very comfortable upgrading to 5.6. They do not offer the "native" option and I have to manually select modules etc which is confusing to me.

2) I upgraded to WooCommerece Multilingual version 4.0.2 and the upgrade was successful. Before that I was using the previous version.

3) After I did what you asked, everything is back to normal!! Does this mean that next time I upgrade my plugins I will have the same issue?

December 14, 2016 at 3:20 pm #1160284

Bernat Torras

Hi solonH,

Glad to know its working. In any case, after talking with development team they said that another way to fix this could be to simply upload the latest version of the plugin directly to your plugins folder (replacing the previous one). So to make sure we're not using modified code, could you try it?

If everything is ok I'm pretty sure you will not have more issues with this (if so, try uploading the plugin manually again).

Thanks,
Bernat

December 14, 2016 at 3:54 pm #1160320

solonH

Hi,

Where can I get latest version of the plugin in order to upload it?

Thanks.

December 15, 2016 at 6:50 am #1160741

Bernat Torras

You can easily download it from here: hidden link

Hope it helps!

Thanks,
Bernat

December 19, 2016 at 7:59 pm #1164148

solonH

Hi Bernat,

Thank you very much! That worked perfectly.