- สถานะ
- แก้ไขแล้ว
- รายงานสำหรับ
- WPML Multilingual & Multicurrency for WooCommerce 4.12.0
- แก้ไขใน
- WCML 5.1.0
ภาพรวมของปัญหา
WPML Multilingual & Multicurrency for WooCommerce ให้คุณตั้งค่าบัญชี BACS ที่แตกต่างกันสำหรับแต่ละสกุลเงินได้ อย่างไรก็ตาม ปัจจุบัน WCML จะแสดงบัญชี BACS ที่แตกต่างกันทั้งหมดของร้านค้าคุณในหน้ายืนยันคำสั่งซื้อและอีเมล แทนที่จะเป็นบัญชีที่ถูกต้องสำหรับภาษาที่เลือก
วิธีแก้ปัญหาชั่วคราว
โปรดสำรองข้อมูลไซต์ของคุณแบบเต็มก่อนดำเนินการต่อ
- เปิด /wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-payment-gateway-bacs.php.
- ค้นหาบรรทัดที่ 35
- แทนที่:
if ( $gateway_setting && 'all' !== $gateway_setting['value'] ) { if ( 'all_in' === $gateway_setting['value'] ) { $bacs_accounts_currencies = get_option( WCML_WC_Gateways::WCML_BACS_ACCOUNTS_CURRENCIES_OPTION, [] ); foreach ( $bacs_accounts_currencies as $account_key => $currency ) { if ( $gateway_setting['currency'] === $currency ) { $allowed_accounts[] = $accounts[ $account_key ]; } } } else { $allowed_accounts[] = $accounts[ $gateway_setting['value'] ]; } } return $allowed_accounts ? $allowed_accounts : $accounts; - ด้วย:
if ( $gateway_setting && 'all' !== $gateway_setting['value'] ) { $woocurrency = get_woocommerce_currency(); // to get default currency if ( 'all_in' === $gateway_setting['value'] ) { $bacs_accounts_currencies = get_option( WCML_WC_Gateways::WCML_BACS_ACCOUNTS_CURRENCIES_OPTION, [] ); foreach ( $bacs_accounts_currencies as $account_key => $currency ) { if ( $gateway_setting['currency'] === $currency ) { $allowed_accounts[] = $accounts[ $account_key ]; } if ( $gateway_setting['currency'] === NULL && $woocurrency && $woocurrency === $currency ) { //new condition for default currency $allowed_accounts[] = $accounts[ $account_key ]; } } } else { $allowed_accounts[] = $accounts[ $gateway_setting['value'] ]; } } return $allowed_accounts ? $allowed_accounts : $accounts; - ไปที่ WooCommerce > WooCommerce Multilingual & Multicurrency > หลายสกุลเงิน
- แก้ไขสกุลเงินต่างๆ ที่เพิ่มไว้ภายใต้ส่วน “สกุลเงิน”
- เปิดใช้งานตัวเลือก “เกตเวย์ชำระเงิน” สำหรับแต่ละสกุลเงิน
- บันทึกการเปลี่ยนแปลง