WPML
Trạng thái
Đã giải quyết
Được báo cáo cho
WPML Multilingual & Multicurrency for WooCommerce 5.5.4
Đã giải quyết trong
WPML Multilingual & Multicurrency for WooCommerce 5.5.5
Plugin/giao diện liên quan
WooCommerce PayPal Payments
Thẻ chủ đề
Compatibility, WCML

Tổng quan về lỗi

Khi sử dụng WooCommerce PayPal Payments với WPML, bạn có thể gặp lỗi nghiêm trọng sau khi cập nhật WooCommerce Multilingual & Đa tiền tệ lên phiên bản 5.5.4.

Warning: Undefined array key "ppcp-gateway" in /wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php on line 161

Fatal error: Uncaught Error: Call to a member function get_setting() on null

Giải pháp tạm thời

Vui lòng đảm bảo bạn có bản sao lưu toàn bộ trang web trước khi tiếp tục.


  • Mở tệp …/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php.

  • Tìm dòng 152.

  • Thay thế:
    if ( in_array( $id, array_keys( $this->supported_gateways ), true ) ) {
            


  • Bằng:
    if ( in_array( $id, array_keys( $this->supported_gateways ), true ) && in_array( $id, array_keys( $this->payment_gateways ), true ) ) {
            

Tất cả các lỗi đã ghi nhận →