Skip Navigation

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.

This topic contains 2 replies, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 6 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 2, 2023 at 12:26 pm #14142121

alexeyK-12

I set up currencies using the WooCommerce Multilingual & Multicurrency plugin.
I set the currency definition according to the client’s location.
it was expected that when a client buys from the English version of the site, the price of 1500 UAH will go to the Fundy payment gateway. The end result is $1500.
The currency on the site is displayed correctly, but is not correctly transmitted to Fondy. They receive instead 1500 UAH – 1500$

I have disabled this feature for now.

14050905-Screenshot_1_106.png
14050905-Screenshot_2_67.png
August 2, 2023 at 12:34 pm #14142233

alexeyK-12

Fondy support answered me with this phrase
"Good afternoon. Retailers have told you that you can use the "wc_gateway_fondy_payment_params" filter and set the required parameter in currency."

hidden link
hidden link
hidden link

I found this line only in three files.
How can I write a filter so that the correct amount is sent?

August 3, 2023 at 12:34 pm #14149529

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

First of all, I ‘ll advise you to fix “WP Memory Limit” to at least 128MB while 256MB is recommended (for performance reasons). See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Remember to add these lines before the line where it says:
/* That's all, stop editing! Happy publishing. */

Unfortunately this plugin "WooCommerce - Fondy payment gateway" isn't on our compatibility list and looks like it requires custom coding, which is out of scope of this forum.

Theme and plugin authors are welcome to join WPML’s Go Global program, which helps them make their code multilingual ready. Together with WPML’s compatibility team, they can test and confirm that their theme or plugin works with WPML. See https://wpml.org/documentation/support/go-global-program/ for details and you can refer your theme/plugin provider to this as well.

However, generally you 'll call that filter in your theme's functions.php file, with higher number of priority, and process the pre order stuff by getting the current currency or the one you want to process the order with. See https://developer.wordpress.org/reference/functions/add_filter/ on using add_filter().

WCML also offers hooks and filters, please see https://wpml.org/documentation/related-projects/woocommerce-multilingual/wcml-hooks-reference/ for details.

You can also switch the current currency to the desired one (https://wpml.org/wcml-hook/wcml_switch_currency/) before processing the order. But this all depends on how the Fondy's code take this into account.

If you need additional custom work, we recommend you contact WPML Contractors at https://wpml.org/contractors/.

Regards.