Skip to content Skip to sidebar

Resolved

Reported for: WPML Multilingual & Multicurrency for WooCommerce 5.5.4

Resolved in: WPML Multilingual & Multicurrency for WooCommerce 5.5.5

Topic Tags: Compatibility, WCML

Overview of the issue

When using WooCommerce PayPal Payments with WPML, you might experience a fatal error after updating WooCommerce Multilingual & Multicurrency to version 5.5.4.

Warning: Undefined array key "ppcp-gateway" in /wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php on line 161

Fatal error: Uncaught Error: Call to a member function get_setting() on null

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php file.
  • Look for line 152.
  • Replace:
    if ( in_array( $id, array_keys( $this->supported_gateways ), true ) ) {
            
  • With:
    if ( in_array( $id, array_keys( $this->supported_gateways ), true ) && in_array( $id, array_keys( $this->payment_gateways ), true ) ) {