Перейти к содержимому Перейти к боковой панели
Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 13:00 – 16:00 13:00 – 16:00 -

Часовой пояс службы поддержки: Europe/Vienna (GMT+02:00)

Помечено: 

Эта тема содержит 0 ответ, имеет 1 голос.

Последнее обновление: madsL-2 1 месяц назад.

При содействии: Lucas Vidal de Andrade.

Автор Сообщения
18.03.2026 в 08:46 #17906755

madsL-2

Hi WPML Support,

We’re getting a production fatal error from WooCommerce Multilingual & Multicurrency when PayPal Payments initializes.

Error:
PHP Fatal error: Uncaught Error: Call to a member function get_setting() on null
File:
wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php:161

Relevant stack:
• WCML_Currencies_Payment_Gateways->filter_gateway_description(..., 'ppcp-gateway')
• called from filter_paypal_payments_gateway_description(...)
• triggered during PayPal Payments gateway/blocks init.

Installed versions (production):
• WordPress: 6.9.4
• WooCommerce PayPal Payments: 3.4.1
• WPML Multilingual & Multicurrency for WooCommerce: 5.5.4

Observation:
In filter_gateway_description(), WCML checks if $id exists in $this->supported_gateways, then directly calls $this->payment_gateways[$id]->get_setting(...) without confirming $this->payment_gateways[$id] exists/object. In this runtime path, ppcp-gateway is supported but the gateway object is null, causing the fatal.

Could you please provide:
1) an official fix/hotfix, or
2) confirmation of the recommended patch (guarding access to $this->payment_gateways[$id] before calling get_setting()).

This is currently blocking backend/frontend access intermittently in production.

Thank you.

Тема '[Закрытые] Fatal error in WCML PayPal gateway integration (get_setting() on null)' закрыта для новых ответов.