WPML
Status
Resolved
Resolved in
4.12.0

Overview of the issue

In some rare cases where another plugin also manages currencies, WPML Multilingual & Multicurrency for WooCommerce “supported currencies” filter can be triggered when WPML Multilingual & Multicurrency for WooCommerce Multi-Currency is actually disabled.

So far, this issue has only been reported for websites using certain specific plugins that are not officially compatible with WPML / WPML Multilingual & Multicurrency for WooCommerce. Please attempt the workaround below if you experience the following error on your website, either directly on the page, or as a result of an AJAX call when switching currencies or location:

Fatal error: Uncaught Error: Call to a member function get_client_currency() on null in /wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-payment-gateway-paypal.php:158

Workaround

We’re working on a permanent fix for this issue. In the meantime, please use this workaround:


  1. Back up your website files and database.

  2. Modify woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-payment-gateway-paypal.php LINES 156 – 158
    from
    global $woocommerce_wpml;
    		$client_currency = $woocommerce_wpml->multi_currency->get_client_currency();

    to

    global $woocommerce_wpml;
    		if ( is_null( $woocommerce_wpml->multi_currency ) ) {
    			return $supported_currencies;
    		}
    		$client_currency = $woocommerce_wpml->multi_currency->get_client_currency();


If you have any questions or wish to report a related problem, please mention this known issue so that our team can provide you with efficient support.

All known issues →