- סטטוס
- נפתר
- דווח עבור
- WPML Multilingual & Multicurrency for WooCommerce 5.3.0
- נפתר בגרסה
- WooCommerce Multilingual & Multicurrency 5.3.1
- תגיות נושא
- WCML
סקירה כללית של התקלה
אם אתה משתמש ב־WPML רב־לשוני וריבוי מטבעות עבור WooCommerce ובמצב העצמאי שלו עם Stripe כשער התשלומים שלך, ייתכן שתיתקל בבעיות בעת ניסיון לבצע תשלומים במטבע משני. באופן ספציפי, שער התשלומים של Stripe עשוי שלא להיות זמין בקופה במטבע המשני אם הוא אינו מוגדר.
פתרון עוקף
אנא ודא שיש לך גיבוי מלא של האתר לפני שתמשיך.
- פתח את הקובץ …/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-payment-gateway-stripe.php.
- חפש את שורה 78.
- שנה את:
if ( $gateway_settings && isset( $gateway_settings[ $client_currency ] ) ) { $gateway_setting = $gateway_settings[ $client_currency ]; if ( isset( $gateway_setting['publishable_key'] ) && isset( $gateway_setting['secret_key'] ) ) { $settings['publishable_key'] = $gateway_setting['publishable_key']; $settings['secret_key'] = $gateway_setting['secret_key']; } if ( isset( $gateway_setting['test_publishable_key'] ) && isset( $gateway_setting['test_secret_key'] ) ) { $settings['test_publishable_key'] = $gateway_setting['test_publishable_key']; $settings['test_secret_key'] = $gateway_setting['test_secret_key']; } } - ל:
if ( $gateway_settings && isset( $gateway_settings[ $client_currency ] ) ) { $gateway_setting = $gateway_settings[ $client_currency ]; if ( ! empty( $gateway_setting['publishable_key'] ) && ! empty( $gateway_setting['secret_key'] ) ) { $settings['publishable_key'] = $gateway_setting['publishable_key']; $settings['secret_key'] = $gateway_setting['secret_key']; } if ( ! empty( $gateway_setting['test_publishable_key'] ) && ! empty( $gateway_setting['test_secret_key'] ) ) { $settings['test_publishable_key'] = $gateway_setting['test_publishable_key']; $settings['test_secret_key'] = $gateway_setting['test_secret_key']; } }