Resolved

Reported for: WooCommerce Multilingual 3.9.1.1

Resolved in: WooCommerce Multilingual 3.9.2

Symptoms

The problem appears to come from WooCommerce Multilingual 3.9.x and it happens if you had an older version of WooCommerce Multilingual and decided to upgrade to the latest release.

One of the following errors is logged:

PHP Fatal error: Call to undefined method woocommerce_wpml::set_up_capabilities() in .../wp-content/plugins/woocommerce-multilingual/inc/class-wcml-upgrade.php on line 256
PHP Fatal error: Call to undefined method woocommerce_wpml::set_up_capabilities() in .../wp-content/plugins/woocommerce-multilingual/inc/class-wcml-upgrade.php on line 273

Workaround

As a workaround, you can use one of these methods:

Method 1

  1. Install WooCommerce Multilingual 3.3 first – you can get it from this page: https://wordpress.org/plugins/woocommerce-multilingual/developers/
  2. Install the latest release – WooCommerce Multilingual 3.9.1.1

Please note that the order of the steps is important for the workaround to be successful.

Method 2

  1. Edit the following file: …wp-contentpluginswoocommerce-multilingualincclass-wcml-upgrade.php
  2. Replace the following code on lines 256 and 273):
    woocommerce_wpml::set_up_capabilities();
    

    with this code:

    WCML_Capabilities::set_up_capabilities();
    

3 Responses to “Fatal error when updating WooCommerce Multilingual from older version 3.1 to 3.9.1.1”