WPML
สถานะ
แก้ไขแล้ว
รายงานสำหรับ
WPML Multilingual & Multicurrency for WooCommerce 4.12.0
แก้ไขใน
WCML 5.1.0

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

WPML Multilingual & Multicurrency for WooCommerce ให้คุณตั้งค่าบัญชี BACS ที่แตกต่างกันสำหรับแต่ละสกุลเงินได้ อย่างไรก็ตาม ปัจจุบัน WCML จะแสดงบัญชี BACS ที่แตกต่างกันทั้งหมดของร้านค้าคุณในหน้ายืนยันคำสั่งซื้อและอีเมล แทนที่จะเป็นบัญชีที่ถูกต้องสำหรับภาษาที่เลือก

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

โปรดสำรองข้อมูลไซต์ของคุณแบบเต็มก่อนดำเนินการต่อ

  1. เปิด /wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-payment-gateway-bacs.php.
  2. ค้นหาบรรทัดที่ 35
  3. แทนที่:
     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; 
  4. ด้วย:
     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; 
  5. ไปที่ WooCommerce > WooCommerce Multilingual & Multicurrency > หลายสกุลเงิน
  6. แก้ไขสกุลเงินต่างๆ ที่เพิ่มไว้ภายใต้ส่วน “สกุลเงิน”
  7. เปิดใช้งานตัวเลือก “เกตเวย์ชำระเงิน” สำหรับแต่ละสกุลเงิน
  8. บันทึกการเปลี่ยนแปลง

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