2017-04-24 64 views
0

由於Woocommerce發佈Woocommerce 3.0,Klarnas付費插件無法正常工作。更新爲Klarna(Woocommerce 3.0)

例如,我得到這個錯誤。

注意:country was called incorrectly。不應直接訪問客戶屬性。 Backtrace:require('wp-blog-header.php'),require_once('wp-includes/template-loader.php'),include('/ themes/twentyseventeen/page.php'),get_template_part,locate_template,load_template,需要('/ themes/twentyseventeen/template-parts/page/content-page.php'),the_content,apply_filters('the_content'),WP_Hook-> apply_filters,do_shortcode,preg_replace_callback,do_shortcode_tag,WC_Shortcodes :: checkout,WC_Shortcodes ::包括('/ plugins/woocommerce/templates/checkout/form-checkout.php'),do_action('woocommerce_checkout_order_review'),WP_Hook-> do_action,WP_Hook-> apply_filters ,woocommerce_checkout_payment,WC_Payment_Gateways-> get_available_payment_gateways,WC_Gateway_Klarna_Part_Payment-> is_available,WC_Gateway_Klarna_Part_Payment-> check_required_fields,WC_Gateway_Klarna_Helper-> get_eid,WC_Legacy_Customer- in /mnt/persist/www/dev10/wp-includes/functions.php on line 4138

注意:WC_Customer :: get_country從版本3.0開始已棄用!改用WC_Customer :: get_billing_country。 in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830

注意:WC_Customer :: get_country從版本3.0開始已棄用!改用WC_Customer :: get_billing_country。 in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830

注意:WC_Customer :: get_country從版本3.0開始已棄用!改用WC_Customer :: get_billing_country。 in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830

注意:WC_Customer :: get_country從版本3.0開始已棄用!改用WC_Customer :: get_billing_country。 in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830

注意:WC_Customer :: get_country從版本3.0開始已棄用!改用WC_Customer :: get_billing_country。 in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830.

難道那些有我的解決方案嗎?

謝謝!

+0

你應該問插件的作者.. – Reigel

+0

我已經通過電子郵件發送給作者(Krokedil)這件事。你也應該讓他們繼續前進。 –

+0

是的,這就對了!我還通過電子郵件發送了作者,希望他們能儘快解決這個問題! – Daniel

回答

0

正如我的評論所述,你應該真的要求Klarna修復他們插件中的錯誤。但是關於你的其他問題,它很容易解決。至少,這是給我的。

只需在您的主題和插件文件中搜索get_country(即可。將所有找到的內容替換爲get_billing_country(。我在我的主題文件中引用了這個。改變它後,錯誤消失了。

+0

奧基,我會這樣做。謝謝! – Daniel