- Status
- Resolved
- Reported for
- WPML Multilingual & Multicurrency for WooCommerce 3.9.1.1
- Resolved in
- WPML Multilingual & Multicurrency for WooCommerce 3.9.2
Overview of the issue
The problem appears to come from WPML Multilingual & Multicurrency for WooCommerce 3.9.x and it happens if you had an older version of WPML Multilingual & Multicurrency for WooCommerce 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
- Install WooCommerce Multilingual 3.3 first – you can get it from this page: https://wordpress.org/plugins/woocommerce-multilingual/developers/
- Install the latest release – WPML Multilingual & Multicurrency for WooCommerce 3.9.1.1
Please note that the order of the steps is important for the workaround to be successful.
Method 2
- Edit the following file: …\wp-content\plugins\woocommerce-multilingual\inc\class-wcml-upgrade.php
- Replace the following code on lines 256 and 273):
woocommerce_wpml::set_up_capabilities();
with this code:
WCML_Capabilities::set_up_capabilities();