WPML

Overview of the Issue

If you are using WPML Multilingual & Multicurrency for WooCommerce and its standalone mode with Stripe as your payment gateway, you may encounter issues when attempting to make payments in a secondary currency. Specifically, the Stripe payment gateway may not be available during checkout in the secondary currency if it is not set.

Workaround

This issue is fixed in WooCommerce Multilingual & Multicurrency 5.3.1. Updating solves it on your site, so you only need this workaround if you can’t update yet.

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

  • Open …/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-payment-gateway-stripe.php file.
  • Look for line 78.
  • Change:
    PHP
    if ( $gateway_settings && isset( $gateway_settings[ $client_currency ] ) ) {
    	$gateway_setting = $gateway_settings[ $client_currency ];
    	if ( isset( $gateway_setting['publishable_key'] ) && isset( $gateway_setting['secret_key'] ) ) {
    		$settings['publishable_key'] = $gateway_setting['publishable_key'];
    		$settings['secret_key']      = $gateway_setting['secret_key'];
    	}
    	if ( isset( $gateway_setting['test_publishable_key'] ) && isset( $gateway_setting['test_secret_key'] ) ) {
    		$settings['test_publishable_key'] = $gateway_setting['test_publishable_key'];
    		$settings['test_secret_key']      = $gateway_setting['test_secret_key'];
    	}
    }
  • For:
    PHP
    if ( $gateway_settings && isset( $gateway_settings[ $client_currency ] ) ) {
    	$gateway_setting = $gateway_settings[ $client_currency ];
    	if ( ! empty( $gateway_setting['publishable_key'] ) && ! empty( $gateway_setting['secret_key'] ) ) {
    		$settings['publishable_key'] = $gateway_setting['publishable_key'];
    		$settings['secret_key']      = $gateway_setting['secret_key'];
    	}
    	if ( ! empty( $gateway_setting['test_publishable_key'] ) && ! empty( $gateway_setting['test_secret_key'] ) ) {
    		$settings['test_publishable_key'] = $gateway_setting['test_publishable_key'];
    		$settings['test_secret_key']      = $gateway_setting['test_secret_key'];
    	}
    }

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.