- สถานะ
- เปิด
- รายงานสำหรับ
- WPML Multilingual & Multicurrency for WooCommerce 5.1.2
- ปลั๊กอิน/ธีมที่เกี่ยวข้อง
- PayZen for WooCommerce
- แท็กหัวข้อ
- Compatibility
ภาพรวมของปัญหา
เมื่อใช้ปลั๊กอิน PayZen for WooCommerce คำสั่งซื้อ WooCommerce จะไม่ปรากฏในแดชบอร์ด และมีข้อผิดพลาด PHP ต่อไปนี้ปรากฏขึ้น:
PHP Fatal error: Uncaught TypeError: md5(): Argument #1 ($string) must be of type string, array given in …wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php:210
วิธีแก้ปัญหาชั่วคราว
โปรดตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลทั้งหมดของไซต์ของคุณก่อนดำเนินการต่อ
เปิดไฟล์ functions.php ของธีมของคุณและเพิ่มโค้ดนี้:
add_filter( 'option_woocommerce_payzenstd_settings', function( $settings ) {
$locale = get_locale();
foreach ( [ 'title', 'description' ] as $key ) {
if ( is_array( $settings[ $key ] ) ) {
$settings[ $key ] = isset( $settings[ $key ][ $locale ] )
? $settings[ $key ][ $locale ]
: $settings[ $key ]['en_US'];
}
}
return $settings;
} );