Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing an issue where all payment methods are displayed twice on the thank you page and in the order email in your WooCommerce project,
Solution:
We have escalated the issue to our developers for a permanent fix. Meanwhile, we recommend you try the following workaround:
1. Edit the file

woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php

2. On line number 38, replace the existing code with:

add_action( 'wp_loaded', [ $this, 'init_gateways' ] );

If this solution doesn't look relevant to your issue, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Dražen 11 months, 3 weeks ago.

Assisted by: Dražen.

Author Posts
December 21, 2023 at 12:22 pm #15110029

Konstantinos

Hello. same problem on my project also. All payment methods show twice in thank you page and in order email.
Let me know if I can provide any access or anything.

December 21, 2023 at 12:23 pm #15110039

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for the report.

We have escalated this issue further to our 2nd tier and are checking this.

I will update you soon on the status.

Regards,
Drazen

December 22, 2023 at 12:54 pm #15117399

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

the issue has been escalated to our devs for a permanent fix, in the meantime you can use the next workaround.

Edit the file \woocommerce-multilingual\classes\multi-currency\payment-gateways\class-wcml-currencies-payment-gateways.php on line number 38 replace

		add_filter( 'woocommerce_payment_gateways', Fns::tap( Fns::withoutRecursion(
			Fns::identity(),
			[ $this, 'init_gateways' ]
		) ), PHP_INT_MAX );

with

	
add_action( 'wp_loaded', [ $this, 'init_gateways' ] );

Regards,
Drazen