Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

This topic contains 6 replies, has 1 voice.

Last updated by Bobby 1 month ago.

Assisted by: Bobby.

Author Posts
December 4, 2025 at 5:52 pm #17635820

pawanJ

Hi WPML Support,

After installing the Airwallex Payments plugin for WooCommerce, WPML Multilingual & Multicurrency immediately fails to load and WordPress enters recovery mode. The error originates from class-wcml-wc-gateways.php when WPML attempts to translate gateway strings.

The fatal error:
Uncaught TypeError: WCML_WC_Gateways::translate_gateway_strings():
Argument #1 ($gateway) must be of type WC_Payment_Gateway,
Airwallex\Gateways\Settings\APISettings given

This shows that WPML is treating an object from the Airwallex plugin (Airwallex\Gateways\Settings\APISettings) as a payment gateway, even though it does not extend WC_Payment_Gateway.

It appears that when WPML filters the list of WooCommerce payment gateways, it does not validate that each gateway conforms to WooCommerce’s expected interface before attempting translation. This triggers an immediate E_ERROR.

Can you confirm whether WPML can add a type check or exclusion logic so non-gateway objects do not break the translation flow?

If needed, we can provide access to a staging environment or the full stack trace.

Thanks,
Pawan

December 4, 2025 at 6:45 pm #17635951

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

It looks like this error occurs when trying to translate the API setting of "Airwallex Online Payments Gateway".

Could you please verify if you have translated any settings (admin_texts) for this plugin on WPML > String Translation?

If there are translated admin_texts strings for the plugin, please verify that they are translated correctly, or try deleting the string from WPML > String Translation.

If this does not solve the issue, we can offer to take further steps.

Best regards
Andreas

December 4, 2025 at 7:14 pm #17636027

pawanJ

Hey Andreas thanks so much for your answer. Unfortunately I can't find any String Translations that reference the Airwallex plugin and not in the "domains" list either. I can provide you access if easier? Sites in staging so its all good.

December 5, 2025 at 2:14 am #17636557

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

December 10, 2025 at 7:36 am #17650257

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for the access details!

Do I have permission to update the WPML plugins?

At the moment both the WPML plugins and Airwallex are using older and no longer supported versions.

December 17, 2025 at 12:16 am #17669335

pawanJ

Hello. Sorry I just saw this reply. Yes you have permissions to make any changes/updates as needed. Its a staging site.

December 18, 2025 at 9:56 am #17673870

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you.

I can confirm that the issue remains with the latest versions.

Airwallex is not an officially compatible plugin with WPML, meaning that we have not tested this plugin before.

At the moment I can also reproduce the behavior in a sandbox environment.

This is ultimately an Airwallex plugin bug: APISettings should not be registered as a gateway in the WooCommerce gateways list.

If possible please report it to Airwallex and share the following log with them

Fatal error: Uncaught TypeError: WCML_WC_Gateways::translate_gateway_strings(): Argument #1 ($gateway) must be of type WC_Payment_Gateway, Airwallex\Gateways\Settings\APISettings given, called in /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php on line 112 and defined in /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php:117 Stack trace: #0 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php(112): WCML_WC_Gateways->translate_gateway_strings(Object(Airwallex\Gateways\Settings\APISettings)) #1 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php(79): WCML_WC_Gateways->payment_gateways_filters(Object(Airwallex\Gateways\Settings\APISettings)) #2 [internal function]: WCML_WC_Gateways->loaded_woocommerce_payment_gateways(Array) #3 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(358): call_user_func_array(Array, Array) #4 /home/customer/www/staging2.swftconnect.com/public_html/wp-includes/class-wp-hook.php(341): WPML\FP\Fns::WPML\FP\{closure}(Array) #5 /home/customer/www/staging2.swftconnect.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #6 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(92): apply_filters('woocommerce_pay...', Array) #7 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(77): WC_Payment_Gateways->init() #8 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(50): WC_Payment_Gateways->__construct() #9 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(1205): WC_Payment_Gateways::instance() #10 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php(207): WooCommerce->payment_gateways() #11 /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php(92): WCML_Currencies_Payment_Gateways->get_available_payment_gateways() #12 /home/customer/www/staging2.swftconnect.com/public_html/wp-includes/class-wp-hook.php(341): WCML_Currencies_Payment_Gateways->init_gateways('') #13 /home/customer/www/staging2.swftconnect.com/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #14 /home/customer/www/staging2.swftconnect.com/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #15 /home/customer/www/staging2.swftconnect.com/public_html/wp-settings.php(764): do_action('wp_loaded') #16 /home/customer/www/staging2.swftconnect.com/public_html/wp-config.php(68): require_once('/home/customer/...') #17 /home/customer/www/staging2.swftconnect.com/public_html/wp-load.php(50): require_once('/home/customer/...') #18 /home/customer/www/staging2.swftconnect.com/public_html/wp-admin/admin.php(35): require_once('/home/customer/...') #19 /home/customer/www/staging2.swftconnect.com/public_html/wp-admin/plugin-install.php(16): require_once('/home/customer/...') #20 {main} thrown in /home/customer/www/staging2.swftconnect.com/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php on line 117

Note that WooCommerce gateways should be WC_Payment_Gateway-compatible.

WooCommerce’s payment gateway API expects gateways to extend WC_Payment_Gateway.

Related documentation:
hidden link

In the meantime I will also share this with our compatibility team, however, please let me know the feedback from the plugin's team as the bug is within their code and not due to WPML.

The topic ‘[Closed] Airwallex payment gateway support’ is closed to new replies.