WPML
สถานะ
แก้ไขแล้ว
แก้ไขใน
4.7.3

ภาพรวมของปัญหา

ใน WPML Multilingual & Multicurrency for WooCommerce เวอร์ชัน 4.7.0 คุณอาจพบข้อผิดพลาดนี้หากคุณเข้าชมหน้าผลิตภัณฑ์หรือหน้าที่มีตัวสลับสกุลเงิน

PHP Fatal error: Uncaught LogicException: A function must be an instance of Twig_FunctionInterface or Twig_SimpleFunction. in .../public_html/wp-content/plugins/sitepress-multilingual-cms/lib/twig/src/Environment.php:1119

Stack trace:

#0 .../public_html/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-templates-factory.php(80): WPMLCoreTwigEnvironment->addFunction(Object(__PHP_Incomplete_Class))

#1 .../public_html/wp-content/plugins/woocommerce-multilingual/inc/template-classes/class-wcml-templates-factory.php(24): WCML_Templates_Factory->maybe_init_twig()

#2 .../public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/currency-switcher/class-wcml-currency-switcher.php(143): WCML_Templates_Factory->get_view()

#3 .../public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/currency in /home/326328.cloudwaysapps.com/mufdqasvkk/public_html/wp-content/plugins/sitepress-multilingual-cms/lib/twig/src/Environment.php on line 1119

[21-Oct-2019 06:34:56 UTC] PHP Fatal error: Uncaught LogicException: A function must be an instance of Twig_FunctionInterface or Twig_SimpleFunction. in .../public_html/wp-content/plugins/sitepress-multilingual-cms/lib/twig/src/Environment.php:1119

ปัญหานี้เกิดจากการรองรับเทมเพลต TWIG ซึ่งเรากำลังดำเนินการยกเลิกการใช้งาน และนักพัฒนาของเราจะแก้ไขในไม่ช้า

วิธีแก้ปัญหาชั่วคราว

เพื่อแก้ไขปัญหานี้ เพียงไปที่แท็บ WooCommerce -> WCML -> หลายสกุลเงิน ในหน้าจัดการเว็บไซต์ ตัวเลือกที่ไม่ถูกต้องในฐานข้อมูลจะถูกล้างที่นี่ และคุณจะไม่พบข้อผิดพลาดร้ายแรงในหน้าผลิตภัณฑ์อีกต่อไป

ปัญหาที่ทราบแล้วทั้งหมด →